A python api for mailinator.com
Python
Switch branches/tags
Nothing to show
Pull request Compare This branch is 1 commit ahead of tmelz:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
mailinator
.gitignore
README.md
requirements.txt
setup.py

README.md

Intro

Mailinator is a service which lets you use anonymous emails for free. This module is a scraper for the website which lets you avoid the hassle of checking for updates to see if your desired email has arrived.

import mailinator
email = mailinator.get_newest_mail('my_username', time_delta=5)

The above code will refresh the my_username@mailinator.com mailbox until an email arrives with a timestamp within the last five minutes.

Additionally, you can view all of the mail for a particular mailbox:

import mailinator
emails = mailinator.get_mail('my_username')
[email.preview_subject for email in emails]

Returns something like the following

['Trends Overview Part III: Consumer',
 'Find Your RV at MyRVLink.com...',
 'pete@sogetthis.com Breitling Discount-74',
 'Delighting Customers with Virtual Call A',
 'Re: [Grinder-use] grinder-use Digest, Vo']

Install

pip install mailinator

Requirements

requests
BeautifulSoup

Command line

This module also includes the command mailinator which is simply a call to get_newest_mail with the first command line argument treated as the user name.