Skip to content

ardagedikk/temporary-mail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Temporary Mail

It allows you to generate disposable emails.

Usage

from temp_mail import TempMail
temp_mail = TempMail()
temp_mail.set_email(temp_mail.get_random_email())

Usage

# If there is not a mail then mailbox[0] is status code, mailbox[1] is error message
# If there is a mail then mailbox[0] is status code, mailbox[1] is mail list. You can get a mail with mailbox[1][n].
mailbox = temp_mail.check_mailbox()
if(mailbox[0] == 200):
    mail = temp_mail.get_mail_from_mailbox(mailbox[1][0])
    print(mail.get("textBody"))
# Mail result.
{
	"id": 639,
	"from": "someone@example.com",
	"subject": "Some subject",
	"date": "2018-06-08 14:33:55",
	"attachments": [{
		"filename": "iometer.pdf",
		"contentType": "application\/pdf",
		"size": 47412
	}],
	"body": "Some message body\n\n",
	"textBody": "Some message body\n\n",
	"htmlBody": ""
}
    

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages