Skip to content
/ pyDismail Public

an API wrapper for temporary/disposable mail providers powered by synox/disposable-mailbox

License

Notifications You must be signed in to change notification settings

j-hc/pyDismail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyDismail

an API wrapper for temporary/disposable mail providers powered by synox/disposable-mailbox

Installation

pip install pyDismail

Usage

from pyDismail import BlubbermailDismail, BmOn2Dismail, YadimDismail


disposable_mail = BlubbermailDismail(mail="example")  # or BmOn2Dismail(mail="example")
print(disposable_mail.mail)
# example@yadim.dismail.de

mails = disposable_mail.fetch_all_mails()
last_received_mail = mails[-1]
print(last_received_mail)
# (Mail: sender=SENDER, time=DATETIME, subject=SUBJECT, id=ID, body=BODY)

print(last_received_mail.parsed_eml)
# parsed eml of the email

print(last_received_mail.body)  # plain body of the email
# This is an email. Hello

disposable_mail.delete_mail(last_received_mail)
# deletes the mail from the server

amount_of_new_mail = disposable_mail.check_for_new()
print(amount_of_new_mail)
# returns the amount of the new mails after the last fetch_all_mails was called

raw_eml = disposable_mail.get_eml(last_received_mail)
# returns the raw eml content of the email

About

an API wrapper for temporary/disposable mail providers powered by synox/disposable-mailbox

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages