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.
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.
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)... 220.127.116.11, 18.104.22.168, 22.214.171.124, ... Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|126.96.36.199|: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
$ ./tmpmail --generate
Use email@example.com 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
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 Linux, Open Source & DevOps via:
|Category||List of Unix and Linux commands|
|Firewall||Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04|
|Network Utilities||dig • host • ip • nmap|
|OpenVPN||CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04|
|Package Manager||apk • apt|
|Processes Management||bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time|
|Searching||grep • whereis • which|
|User Information||groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w|
|WireGuard VPN||Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04|