In the next article we are going to take a look at tmpmail. This is a utility for the command line with which users will be able to create one or more temporary email addresses. With them we can receive emails at these temporary addresses from GNU / Linux and other Unix-like operating systems. Use the 1secmail API to receive the emails.
By default, tmpmail uses the w3m text browser to access the temporary mailbox from where to read the emails. Of course, we can also use any other graphical or text-based web browser, using the argument –Browser followed by the command to start the web browser. Tmpmail is just a bash shell script and is released under the MIT license.
What are temporary email addresses or disposable email?
Today, almost all websites, blogs, forums, and services require a valid email id. In many of these sites, when you create an account with our email address, they will send us a confirmation email. We must verify these types of emails to start using the services of those pages.
Many users do not want to use our personal or professional email to register on these sites and blogs. This is where these disposable emails can come in handy. The users we may use these temporary email addresses to subscribe or create an account in situations where it is mandatory to confirm the email.
Today, there are many temporary email address providers that allow us to quickly create a free, disposable email account so that we can use them when needed. These providers will delete temporary emails after a certain period of time, so nothing is going to stay there.
Install tmpmail on Ubuntu
Tmpmail requires the following prerequisites to function:
All of them We can find them available in the official repositories of most Gnu / Linux distributions. In Ubuntu we will be able to install w3m, curl, jq and git by opening a terminal (Ctrl + Alt + T) and using the command:
sudo apt install curl git jq w3m
After installing the prerequisites, with git we are going to clone the tmpmail repository using command:
git clone https://github.com/sdushantha/tmpmail.git
This will clone the content of the tmpmail repository and save it to a local directory also called tmpmail. Now let's install it in our system, and for this we will only have to access this directory and execute the following command to install tmpmail in our $ PATH, for example / usr / local / bin.
cd tmpmail sudo install tmpmail /usr/local/bin
How to create temporary emails from the command line with Tmpmail
For create a temporary email address using tmpmail, we will only have to execute:
tmpmail -g
Or we can also use:
tmpmail --generate
Either of the above two commands will create a temporary email id with the domain name 1secmail.net. During this example, in my case I got the following id.
isncodfklda@1secmail.org
We can use this account to register an account, download content or comment on a site or forum.
Check if temporary mail works
To check if this email works, simply we will send a test email to this temporary email address. I am going to send this email from a Gmail account.
With this we just sent a test email to a 1secmail email address. Now we are going to return to the terminal and check if the mail has arrived as shown in the next step.
For access 1secmail mailbox, in a terminal (Ctrl + Alt + T) we will only have to execute the following command:
tmpmail
To read the message, we will execute tmpmail with the identification of the email message as it's shown in the following:
tmpmail 84528057
Or we can also use this other command to view the latest email:
tmpmail -r
In case you use the default w3m command line web browser to view email and want to exit, press q continued y to confirm.
To change the web browser used to display email, you can use tmpmail -b. For example, to see the most recent email received by our disposable email account using the Firefox web browser, in the terminal (Ctrl + Alt + T) we would have to use the command:
tmpmail -b firefox -r
If we are interested in obtaining more information about this utility, we can consult the help of the project using the command:
tmpmail -h
Users also we can get more information about this utility, users can use the project GitHub page.
Interesting. And to send an email from the temporary address created, how would it be done?
Hello. With this tool you will not be able to send emails. The tool is what it is for. Salu2.
Oh, Ok thanks. Yes, I know what it is for. That's why I was asking. As far as I know, from all temporary email accounts you can send emails, another thing is that you do not know.
Interesting !, but I don't know if it works with messages encrypted with gpg