The tmpmail is a handy utility where the user is allowed to create and use the temporary email address to use the incoming mail.
Our technical team support will assist our clients with several Command-line queries under our server management plan. You can also take assistance from our technical team support 24/7 will handle similar issues or any sort of installation and migration.
Let’s have a glance at various aspects of tmpmail along with its setup and configuration.
How to Setup and Configure tmpmail
To begin, we suggest you have the following.
- w3m – A text-based web browser.
- wget or curl command.
- jq – A flexible, lightweight JSON processor for the command line.
To install w3m, wget, curl and jq in Arch Linux and Manjaro Linux, then run the following:
$ sudo pacman curl jq w3m wget
On Debian, Ubuntu and its derivatives:
$ sudo apt install curl wget jq w3m
Fedora, RHEL, CentOS:
$ sudo dnf install curl wget jq w3m
OpenSUSE:
$ sudo dnf install curl wget jq w3m
tmpmail Installation
We try to use the wget command or the curl command in order to download the script from github.
Follow the commands in order to open the terminal and copy and its type.
[root@server ~]# wget https://raw.githubusercontent.com/sdushantha/tmpmail/master/tmpmail
–2021-04-12 12:31:32–
Resolving raw.githubusercontent.com (raw.githubusercontent.com)… 151.101.248.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.248.133|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 12433 (12K) [text/plain]
Saving to: ‘tmpmail.’
tmpmail 100%[=========================================>] 12.14K –.-KB/s in 0s
2021-04-12 12:31:32 (97.9 MB/s) – ‘tmpmail’ saved [12433/12433]
[root@server ~]#
Run the chmod command against the script to modify the permissions in order to make the file executable.
[root@server ~]# chmod -v +x tmpmail
Later, move the file to somewhere in your location $PATH
[root@server ~]# mv tmpmail /bin/
[root@server ~]# which tmpmail
/usr/bin/tmpmail
[root@server ~]#
Help File
The help file will provide the list of info in order to use the tmpmail.
Use the bl commands to view the content of the help file.
[root@server ~]# tmpmail –help
tmpmail
tmpmail -h | –version
tmpmail -g [ADDRESS]
tmpmail [-t | -b BROWSER] -r | ID
If there is no option and no argument the tmpmail will list the inbox message according to their IDs.If one argument tmpmail arises the message will show the email of that specified ID.
-b, –browser BROWSER
Specify BROWSER (default: w3m) that is used to render the HTML of the email
-g, –generate [ADDRESS]
Generate a new email address, either the specified ADDRESS, or randomly create one
-h, –help
Show help
-r, –recent
Which shows the most recent email message
-t, –text
Shows the email as a raw text, where all the HTML tags are removed. Without this option, HTML is used.
–version
Show version
[root@server ~]#
Usage
- Generate a New tmpmail Address
Creating new temporary email address via:
[root@server ~]# tmpmail –generate
[email protected]
[root@server ~]#
We use the [email protected] temporary email address to send and receive messages.
- Receive Email
- Need to send an email to the address that given below from the Gmail account in order to test the installation and the functionality.
After a while of running the tmpmail command will get the following result.
[root@server ~]# tmpmail
[ Inbox for [email protected] ]
105575154 info@example .com Tmpmail Test
[root@server ~]#
where the mail went and received through the tmpmail, now you can see the email as the raw text, where all the HTML tags are removed using:
[root@server ~]# tmpmail 105575154
Hit the ‘q’ button after reading the email, to reconfirm and exit w3m hit on ‘y’ button.
Eventually, the browser will close and return us to the command prompt.
- View Recent Email
To view the most recent one from the multiple emails.
[root@server ~]# tmpmail -r
You can see the enormous email, to view the list of current emails rerun the tmpmail command.
[root@server ~]# tmpmail
[ Inbox for [email protected] ]
105576629 [email protected] Re: Tmpmail Test
105575154 [email protected] Tmpmail Test
[root@server ~]#
- Change Browser Type
By running either of the commands, you can change the browser type to render the HTML of the email.
We [root@server ~]# tmpmail –browser lynx 105576629
[root@server ~]# tmpmail -b lynx 105576629
You can also use firefox’s path (browser like Firefox) to open the email.
[root@server ~]# tmpmail -b /usr/bin/firefox 105576629
- View Email in Plaintext
In addition, we can view the email in plaintext. For that, use the -t or –text flags to read the message.
[root@server ~]# tmpmail -t 105576629 [root@server ~]# tmpmail –text 105576629 To: [email protected] From: [email protected] Subject: Re: Tmpmail Test This is a 2nd test email.
Regards,
=====================
example
example Marketing Team
On Mon, Apr 14, 2021 at 4:42 PM info<@example.comm> wrote:
Test1
Regards,
=====================
example
example Marketing Team [root@server ~]#
Attachments
Let’s check whether the temp email can receive an attachment.
In this test where you can create a new email from the Gmail account and attach a text file to see if it will provide a link to the file.
[root@server ~]# tmpmail
[ Inbox for [email protected] ]
105578915 [email protected] Attachment Test Email
105576629 [email protected] Re: Tmpmail Test
105575154 [email protected] Tmpmail Test
[root@server ~]#
We received the email from the output.
Look for the attachment:
[root@server ~]# tmpmail 105578915
If there is no attachment in the w3m view, you can check in plaintext view
[root@server ~]# tmpmail -t 105578915
To: [email protected]
From: [email protected]
Subject: Attachment Test Email
In this email >> created a text file >> attached and sent to >> tmpmail email address which has created.
Here ya go!
Regards,
=====================
example
example Marketing Team
[root@server ~]#
Not seen attachment either.
In reviewing the API from 1secmail.com, the API can receive attachments. However, this script is not equipped to use that functionality.
Where Does the Domain Originate From?
Like other temporary email services (e.g., temp-mail.org, 10minutemail.com), the domain name is pulled from domains owned by 1secmail.
Generating email address via an API call from 1secmail.com and links to one of the following domains.
- 1secmail.com
- 1secmail.net
- 1secmail.org
- esiix.com
- wwjmp.com
By following this method you can generate an infinite amount of email addresses from those five domains.
Conclusion
In brief, follow an effective step to setup and configure tmpmail. If you need any assistance you can contact our support team to fix the problem on your behalf.