Skip to content

Latest commit

 

History

History
48 lines (31 loc) · 1.33 KB

README.rst

File metadata and controls

48 lines (31 loc) · 1.33 KB

temp-mail

Python API Wrapper for temp-mail.org service. Temp-mail is a service which lets you use anonymous emails for free. You can view full API specification in api2.temp-mail.org.

Requirements

requests - required.

simplejson - optional, for a serious speed boost in JSON decode.

Installation

Installing with pip:

$ pip install temp-mail

Usage

Get all emails from given email login and domain:

from tempmail import TempMail

tm = TempMail(login='denis', domain='@gnail.pw')
api_host = 'privatix-temp-mail-v1.p.rapidapi.com'
api_key='place_your_key_here'
tm.set_header(api_host,api_key)
print tm.get_mailbox()  # list of emails in denis@gnail.pw

Generate email address and get emails from it:

from tempmail import TempMail

tm = TempMail()
api_host = 'privatix-temp-mail-v1.p.rapidapi.com'
api_key='place_your_key_here'
tm.set_header(api_host,api_key)
email = tm.get_email_address()  # v5gwnrnk7f@gnail.pw
print tm.get_mailbox(email)  # list of emails
Bitdeli badge