Skip to main content

A Disposable Mailbox Powered by Pure-Python

Project description

pydispo

A Disposable Mailbox Powered by Pure-Python Tweet

language Release License: GPL v3

pydispo is a pure-pythonic way of managing disposable mailbox that allows users to create several disposable email addresses and receive emails on those. It can be directly used from the command line or imported as a python module for advanced usage. pydispo is platform-independent and uses python standard libraries, so if you have python installed you don't need to satisfy any additional dependencies.

Optionally, pydispo can fetch attached files and there's also a provision to save emails as HTML. By default, the emails are shown as text, optionally any standard web browser can be used to view the emails. Currently, it uses 1secmail API to receive emails, and soon it would support additional APIs. If you want a bash-like implementation with some dependencies, please check the tmpmail script.

Installation

Standalone

Download the pydispo standalone script and make it executable

$ curl -L "https://git.io/pydispo" > pydispo && chmod +x pydispo

PyPI

pydispo is also available as a python package from https://pypi.org/project/pydispo/. Download and install it as a system or environment package with pip. It can be then used in a CLI mode or as a python module

$ pip install pydispo

Source

Alternatively, the latest pydispo package source tarball can be downloaded from here (18.9 kB).

Usage

Usage Demo

Usage: pydispo [-h] [-a] [-r] [-g] [-s] [-b BROWSER] [-e EMAIL] [id]

Options
  id                    Check email with message ID (default shows mailbox)
  -h, --help            show this help message and exit
  -a, --attached        Download all attached files in the email
  -r, --recent          Check the recent email
  -g, --generate        Generate a new email address
  -s, --save            Save email in an HTML file
  -b, --browser         Browser to check the email in HTML
  -e, --email           Check mailbox of a particular email

Examples

Generate a disposable email address

$ pydispo -g
Generated: ma4x8pgolq@1secmail.org

Check the mailbox

$ pydispo
Mailbox:  ma4x8pgolq@1secmail.org  Mails in Inbox: 1
Message ID       Sender                  Subject         Date
84784986         yourfriend@mail.com     About pydispo   2020-09-16 17:34:13

Check a particular email

$ pydispo 84784986
ID:  84784986
To:  ma4x8pgolq@1secmail.org
From:  yourfriend@mail.com
Date:  2020-09-16 17:34:13
Subject:  About pydispo
Attachments:  ['pydispo_leaflet.pdf   (application/pdf)   0.2 MB ']
--------------------
Check this out
Cheers.
--------------------

Check the recent email

$ pydispo -r

Check a particular email, get attached files, and save email as HTML

$ pydispo -a -s 84784986 

Check a particular email in a browser of choice

$ pydispo 84784986 -b elinks

Check mailbox of another disposable email

$ pydispo -e g6cqog5utd@1secmail.net

Using as a python module

$ python
>>> from pydispo import *
>>> email_addr = generate_email_address(size=10,storeInFile='email_address',mode='w') 
Generated: ma4x8pgolq@1secmail.org
>>> check_mailbox(email_addr,showInbox=True,showRecent=False)
Mailbox:  ma4x8pgolq@1secmail.org  Mails in Inbox: 1
Message ID       Sender                  Subject         Date
84784986         yourfriend@mail.com     About pydispo   2020-09-16 17:34:13

Issues:

Problems? Please raise an issue at https://github.com/aakash30jan/pydispo/issues.

Issues PRs Welcome

Why disposable emails?

To avoid SPAM. To protect your PRIVACY. Lots of web pages, blogs, forums and services would ask you to register or provide email addresses to read comments, download content, or register account or profile. And a lot of them will use your private email address to send you spam. Disposable emails are perfect for any transaction where you want to improve your online privacy, like when you trade cryptocurrencies. These are also used by developers and testers for several time-saving reasons. Read More : How-To Geek , WIRED

Credits

pydispo is a dependency-free, platform-independent replication of Siddharth's tmpmail bash-script and follows a usage pattern similar to it.

License

This work is licensed under a GNU General Public License Version 3 . Open Source Love svg3

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

pydispo-20.10b1.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pydispo-20.10b1-py2.py3-none-any.whl (7.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pydispo-20.10b1.tar.gz.

File metadata

  • Download URL: pydispo-20.10b1.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for pydispo-20.10b1.tar.gz
Algorithm Hash digest
SHA256 503b03419042f536eb80efd7fb1a8c9f81f5eb315effa7b0941f88b386eef401
MD5 b9b30b27242eae8494788ab6396144fd
BLAKE2b-256 70fab6e6c6993afd807f77ae0adcb567b8f7a0631e312565cfb8e2b28b1c865d

See more details on using hashes here.

File details

Details for the file pydispo-20.10b1-py2.py3-none-any.whl.

File metadata

  • Download URL: pydispo-20.10b1-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for pydispo-20.10b1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 44e074ce7839392c9b760b01e24cf452db47814fa92e0c38e6e38ece567d2ce6
MD5 9edec6ba33aa7ff8fff1345d745366be
BLAKE2b-256 9d62973ba6d87207d397eca487e53e1ed740b8514d1358c594002dca82a41d44

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page