A basic wrapper around various temp mail sites, aiming to provide an almost identical api for every site. The main purpose of this is to provide an easy way to quickly register an account on various sites and then discard the email.
Project description
temp-mails
A basic wrapper around various temp mail sites, aiming to provide an almost identical api for every site.
The main purpose of this is to provide an easy way to quickly register an account on various sites and then discard the email.
Installation
While every python3 version should hypothetically work, python 3.12 is best
pip install temp-mails
Requirements
pip install requests beautifulsoup4 lxml
Supported Sites
- https://10minemail.com/
- https://10minutemail.com/
- https://internxt.com/temporary-email
- https://10minutemail.com/
- https://temp-mail.io/
- https://temp-mail.org/
- https://temp-mailbox.com/
- https://etempmail.net/10minutemail
- https://10minutesemail.net/
Usage
Create an email on the site https://10minemail.com/
from temp_mails import tenminemail_com
mail = tenminemail_com() # Generate a random email address
print(mail.email) # get the name of the email (e.g. example@examplehost.com)
print(mail.get_inbox()) # get all emails in the inbox
print(mail.wait_for_new_email(delay=1.0, timeout=120)) # wait for a new email for 120 seconds and get the email data
The wrapper api for each email host is very similar, so little refactoring is needed in order to change the email host. However, the email data may change in format or similar. One email host could just return a string with the html content of the email, another one could return a dict with subject, content etc.
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
Built Distribution
Hashes for temp_mails-1.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0342b2fcc47049f620a411db9d8bb3562aef5a6883fd75ec8134101f4e7ab54 |
|
MD5 | 667f021f4b76625ac19ae118afeb6308 |
|
BLAKE2b-256 | bf06af738afaf28f164126acd08628d77871f620a518a75a9ead682d02b6589c |