Call Us! 1-800-383-5193
Call Us! 1-800-383-5193
Call Us! 1-800-383-5193

Need Help?

Emergency Response Time custom

Our experts have had an average response time of 11.98 minutes in June 2021 to fix urgent issues.

We will keep your servers stable, secure and fast at all times for one fixed price.

How to Setup and Configure tmpmail

by | Apr 13, 2021

How to Setup and Configure tmpmail? Let’s discuss.

If we choose to stay within the command line for almost every role or purpose, tmpmail is a handy utility. It is a quick and easy method to create a temporary email address to use for incoming mail.

As part of our Server Management Services, we assist our customers with several Command-line queries.

Today, let us discuss the various aspects of tmpmail along with its setup and configuration.


How to Setup and Configure tmpmail

In order to begin, our Support Techs suggest having 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, we run:

$ 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


$ sudo dnf install curl wget jq w3m


tmpmail Installation

Initially, we use the wget command or curl command to download the script from GitHub.

Then we open a terminal and copy or type in the following command:

[root@server ~]# wget

–2021-04-12 12:31:32–
Resolving (…

Connecting to (||: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 ~]#

Now, to make the file executable we run the chmod command against the script to modify the permissions:

[root@server ~]# chmod -v +x tmpmail

Then, we will move the file to a location somewhere in our $PATH:

[root@server ~]# mv tmpmail /bin/
[root@server ~]# which tmpmail
[root@server ~]#


Help File

The info from Help File provides a shortlist of how to use tmpmail.

To view the contents of the help file, we use the bl commands.

[root@server ~]# tmpmail –help
tmpmail -h | –version
tmpmail -g [ADDRESS]
tmpmail [-t | -b BROWSER] -r | ID

When called with no option and no argument, tmpmail lists the inbox messages and their numeric IDs. When called with one argument, tmpmail shows the email message with the 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
View the most recent email message

-t, –text
View the email as raw text, where all the HTML tags are removed. Without this option, HTML is used.

Show version
[root@server ~]#



  • Generate a New tmpmail Address

We can create a new temporary email address via:

[root@server ~]# tmpmail –generate
[root@server ~]#

We can now use the temporary email address to send and receive messages.

  • Receive Email

To test this installation and its functionality, we send an email to the address above from a Gmail account.

After a few minutes of running the tmpmail command, we will receive this output:

[root@server ~]# tmpmail
[ Inbox for ]
105575154 Tmpmail Test
[root@server ~]#

In short, the email went through and was received by tmpmail. We can now view the email as raw text, where all the HTML tags are removed using:

[root@server ~]# tmpmail 105575154

Once we read the email, we hit ‘q,’ and then, when prompted, ‘Do you want to exit w3m? (y/n), hit ‘y’.

Eventually, the browser will close and return us to the command prompt.

  • View Recent Email

If there are multiple emails, we can review the most recent one using:

[root@server ~]# tmpmail -r

If this gives numerous emails, we can rerun the tmpmail command to see a list of the current emails.

[root@server ~]# tmpmail
[ Inbox for ]
105576629 Re: Tmpmail Test
105575154 Tmpmail Test
[root@server ~]#
  • Change Browser Type

We can change the browser type to render the HTML of the email by running either of the two below:

[root@server ~]# tmpmail –browser lynx 105576629
[root@server ~]# tmpmail -b lynx 105576629

Additionally, if we have a browser like Firefox, we can use Firefox’s path 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: From: Subject: Re: Tmpmail Test This is a 2nd test email.


Bob John
Bobcares Marketing Team

On Mon, Apr 12, 2021 at 4:42 PM Bob John <bob@bobcares.comm> wrote:


Bob John
Bobcares Marketing Team [root@server ~]#



On the other hand, let us see if the temp email can receive an attachment.

In this test, we 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 ]
105578915 Attachment Test Email
105576629 Re: Tmpmail Test
105575154 Tmpmail Test
[root@server ~]#

From the output, we know we received the email.

Then we will look for the attachment:

[root@server ~]# tmpmail 105578915

Since there is no attachment in the w3m view, we check in plaintext view.

[root@server ~]# tmpmail -t 105578915
Subject: Attachment Test Email

In this email, we created a text file, attached it and sent it to the tmpmail email address we created.
Here ya go!
Bob John
Bobcares Marketing Team
[root@server ~]#

The attachment was not seen here either.

In reviewing the API from, 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.,,, the domain name is pulled from domains owned by 1secmail.

The email address generates via an API call from and links to one of the following domains.


Using this method, we can generate an almost infinite number of email addresses across those five domains.

[Need help with the configuration? We can help you]



In short, tmpmail is a handy utility for CLI warriors within the command line. Today, we saw an effective method our Support Techs employ on how to Setup and Configure tmpmail.


Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.


var google_conversion_label = "owonCMyG5nEQ0aD71QM";


Submit a Comment

Your email address will not be published. Required fields are marked *