Skip to main content

Temporary Email

Project description

MailTM API Wrapper

MailTm is a free temporary mail service, This library is useful for automation tasks such as making accounts that needs email verification.

Installation

Windows:

pip install MailTm

Linux/Mac OS:

pip3 install MailTm

Example

from mailtm import Email

def listener(message):
    print("\nSubject: " + message['subject'])
    print("Content: " + message['text'] if message['text'] else message['html'])

# Get Domains
test = Email()
print("\nDomain: " + test.domain)

# Make new email address
test.register()
print("\nEmail Adress: " + str(test.address))

# Start listening
test.start(listener)
print("\nWaiting for new emails...")

Documentation

API: https://mail.tm

register(username=None, password=None, domain=None) | Make an email account with random credentials, You can also pass a username, password and domain to use the same account.

start(listener, interval=3) | Start listening for new emails, Interval means how many seconds takes to sync, And you also need to pass a function for listener, This function gets called when new email arrive.

stop() | Stop listening for new emails.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

MailTm-0.0.81.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

MailTm-0.0.81-py3-none-any.whl (4.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page