Are you looking to send a temporary email right from your Linux or Unix terminal? Look no further. Try tmpmail command-line utility that allows you to generate a temporary email address for receiving emails. Underneath the script uses 1secmail’s API to receive the emails.

ADVERTISEMENTS

Why use a disposable email from the terminal or web?

Throwaway email often used to send and receive to avoid SPAM. These days we need an email address everywhere. Want to comment on a random blog post or download something? They will ask for a valid email address. Apart from spam often in data breaches, your email address can log in to other services. Hence for privacy and security, you need to use a disposable email ID. After a specific period, your temporary email ID will be deleted and the address will be canceled. You are thus avoiding spam and other privacy/security nightmare. Please note that you do not use a temporary email for sensitive communication. For example, you must not use a temporary email address for contact with your Bank or any other important stuff.

tmpmail – A temporary email right from your terminal

Enough talk. Let us see how to use the tmpmail script.

Installation

All you have to do is use the wget command or curl command. Open the Terminal application and then type:
$ wget https://raw.githubusercontent.com/sdushantha/tmpmail/master/tmpmail

--2020-09-14 16:55:08-- https://raw.githubusercontent.com/sdushantha/tmpmail/master/tmpmail
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.0.133, 151.101.64.133, 151.101.192.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.0.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 11121 (11K) [text/plain]
Saving to: ‘tmpmail’ tmpmail 100%[=================================================>] 10.86K --.-KB/s in 0.002s 2020-09-14 16:55:08 (5.56 MB/s) - ‘tmpmail’ saved [11121/11121]

Let us review the script:
$ vim tmpmail
Ah, it is a bash script. Make sure you have jq, curl, and w3m installed as dependencies. Run the chmod command to change permissions of a file to executable bit:
$ chmod -v +x tmpmail

Generate a new temporary email address

Execute:
$ ./tmpmail --generate

wsiechwyyzad@1secmail.org

Use wsiechwyyzad@1secmail.org as a disposable temporary email to anyone.

View the most recent email

$ ./tmpmail --recent
Next we can view the email as raw text, where all the HTML tags are removed:
$ ./tmpmail --text
One can change the browser that is used to render the HTML of the email:
$ ./tmpmail --browser your-browser-name-here
./tmpmail --browser lynx

tmpmail – A temporary email right from Linux and Unix terminal

Conclusion

The chances are high that random apps or websites asking to create an account is very common, and so is a data breach. I hope power Linux and Unix users would find this useful including 1secmail’s API to protect their privacy and security online.

???? Get the latest tutorials on SysAdmin, Linux/Unix, Open Source & DevOps topics via:

ADVERTISEMENTS

Similar Posts