Use tmpmail to create a temporary email in the command line
mail Is a new command line utility for creating temporary email addresses that can be used to avoid spam and protect your online privacy.The tool uses 1secmail (One-time email service) API for receiving emails, with only 3 dependencies: w3m, curl and jq. After the installation is complete, you can use the tmpmail command to generate a new email address (-g, --generate
) To view the temporary email address (-r, --recent
), and you can choose to delete HTML tags (-t, --text
), and then specify the web browser of your choice to render the HTML of the email (-b, --browser
) Instead of using the default w3m browser. Even if 1secmail API supports, tmpmail cannot download email attachments. It is also worth noting that you cannot use this feature to send emails (either new emails or reply to received emails), because 1secmail service does not support this feature.
Installation and use
To use tmpmail, make sure you have w3m, curl, and jq installed on your system. You also need to install git to get the tmpmail code from GitHub, install the following packages on Debian/Ubuntu/Linux Mint, Fedora or Arch Linux/Manjaro:
- Debian / Ubuntu / Linux Mint, and other Linux distributions based on Debian or Ubuntu:
sudo apt install w3m curl jq git
- Fedora:
sudo dnf install w3m curl jq git
- Arch Linux / Manjaro:
sudo pacman -S w3m curl jq git
Now you can receive tmpmail From GitHub And install to /usr/local/bin
:
git clone https://github.com/sdushantha/tmpmail
cd tmpmail
sudo install tmpmail /usr/local/bin
You can start using tmpmail now.run tmpmail
Create a temporary, discardable email address in the terminal for the first time:
$ tmpmail
[ Inbox for [email protected] ]
No new mail
use tmpmail
versus -g
Parameters for generating a new email address:
tmpmail -g
run tmpmail
Check again to see if you have any new emails:
$ tmpmail
[ Inbox for [email protected] ]
84274824 [email protected] Tmpmail
84274359 [email protected] Linux Uprising
To read the email, enter tmpmail
Then the email ID, for example:
tmpmail 84274359
Or use the following command to view the latest email:
tmpmail -r
If you use the default w3m command line web browser to view emails and want to exit, press q
Followed by y
confirm.To change the web browser used to display emails, you can use tmpmail -b
. For example, use the Firefox web browser to view the latest emails received by our disposable email account:
tmpmail -b firefox -r
HT: You/boring stuff