Home > python > Get a TrashMail.net disposable email address from the command line

Get a TrashMail.net disposable email address from the command line

Problem
You want access to a website but it asks you to register. Damn. You don’t want to provide your real email address; you need a disposable (temporary) address.

Solution
I love simple solutions. All I want is a command that creates a disposable email address for me and prints this new address on the standard output.

There are lots of services where you can create temporary email addresses. I tried a few but several of them didn’t work or I didn’t like them. TrashMail.net is quite nice but I don’t want to use their web interface each time. I wanted a command line solution.

On trashmail.net I found a bash script (trashmail_sdk_1_1.tar.gz) that does the job. However, some time ago I promised I would never touch bash scripts again. So I rewrote it in Python. The project can be found here: https://github.com/jabbalaci/TrashMail.net-disposable-email-address.

Usage:

./trashmail.py

Output:

# copied to the clipboard
prcb107f@trashmail.net

[ comments @reddit ]

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: