tempmail-client

Client for temp-mail.org


Keywords
tempmail, temp, mail, temp-mail, org, temporary, email
License
MIT
Install
pip install tempmail-client==0.1.1

Documentation

Wrapper for temp-mail.org service (without API token).

Installation

> pip install tempmail-tokenless

Usage

Importing

from tempmail import TempMail

tempmail = TempMail()

Initialization

With random username and random temp-mail.org domain.

> TempMail().email 
< random-username@random-domain.org

With your own username and random temp-mail.org domain.

> TempMail('my-username').email 
< my-username@random-domain.org

With certain email address.

> TempMail('my-username@mail-share.net').email 
< my-username@mail-share.net

API usage

Get list of inbox messages.

> tempmail.get_messages()

< [{
<   'mail_id':      '<message id>',
<   'mail_from':    '<sender title>',
<   'mail_subject': '<subject title>',
<   'mail_text':    '<message text>',
<   ...
< }, {
<   ...
< }]

Get certain message by id.

> tempmail.get_message('<message id>')

< {
<   'mail_id':      '<message id>',
<   'mail_from':    '<sender title>',
<   'mail_subject': '<subject title>',
<   'mail_text':    '<message text>',
<   ...
< }