Skip to main content

an API wrapper for yadim.dismail.de, a disposable mail provider

Project description

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

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

pyDismail-2.3.tar.gz (7.0 kB view hashes)

Uploaded Source

Built Distribution

pyDismail-2.3-py3-none-any.whl (7.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