Skip to main content

No project description provided

Project description

MailTM API Wrapper

MailTm is a free temporary mail service, This fork of library, thats is useful for automation tasks such as making accounts that needs email verification. New in fork:

  • Pydantic models for messages and credentials on register
  • Waiting for mew message
  • Return credentials for new registered account
  • Login method

Installation

Windows:

pip install mailtmpy

Linux/Mac OS:

pip3 install mailtmpy

Example

from mailtmpy 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...")

# Wait for new message
new_message = test.wait_for_new_message()
print("New message:", new_message)

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

mailtmpy-0.1.4.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mailtmpy-0.1.4-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file mailtmpy-0.1.4.tar.gz.

File metadata

  • Download URL: mailtmpy-0.1.4.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/23.6.0

File hashes

Hashes for mailtmpy-0.1.4.tar.gz
Algorithm Hash digest
SHA256 5f0e72a969e14e1fb5fea4f3ef853bb27970e99971aee8f6a1580675b2cc6329
MD5 946acfee7742edef4533d697e8797778
BLAKE2b-256 8eeda3e670338fb903f67eb8e69ed1b4712587dbfd3ba61128f427dc4fb56e13

See more details on using hashes here.

File details

Details for the file mailtmpy-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: mailtmpy-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/23.6.0

File hashes

Hashes for mailtmpy-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 38708559036c554f7a6a0c861c6f51cf18a111cae3db727411bd4bdd92905323
MD5 255bcbf817559341765b179c2ef4b85b
BLAKE2b-256 bc2068298f602079312d3e222baf6cabcbf1233d99c701b8556bdd9b9cdb51d9

See more details on using hashes here.

Supported by

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