CLIENT AREACall Us 1-800-383-5193


Call Us 1-800-383-5193


Call Us 1-800-383-5193

Need help?

Our experts have had an average response time of 13.52 minutes in October 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:

[[email protected] ~]# 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]
[[email protected] ~]#

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

[[email protected] ~]# chmod -v +x tmpmail

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

[[email protected] ~]# mv tmpmail /bin/
[[email protected] ~]# which tmpmail
[[email protected] ~]#


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.

[[email protected] ~]# 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
[[email protected] ~]#



  • Generate a New tmpmail Address

We can create a new temporary email address via:

[[email protected] ~]# tmpmail –generate
[email protected]
[[email protected] ~]#

We can now use the [email protected] 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:

[[email protected] ~]# tmpmail
[ Inbox for [email protected] ]
105575154 [email protected] Tmpmail Test
[[email protected] ~]#

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:

[[email protected] ~]# 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:

[[email protected] ~]# tmpmail -r

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

[[email protected] ~]# tmpmail
[ Inbox for [email protected] ]
105576629 [email protected] Re: Tmpmail Test
105575154 [email protected] Tmpmail Test
[[email protected] ~]#
  • Change Browser Type

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

[[email protected] ~]# tmpmail –browser lynx 105576629
[[email protected] ~]# tmpmail -b lynx 105576629

Additionally, if we have a browser like Firefox, we can use Firefox’s path to open the email.

[[email protected] ~]# 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.

[[email protected] ~]# tmpmail -t 105576629 [[email protected] ~]# tmpmail –text 105576629 To: [email protected] From: [email protected] 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 <[email protected]> wrote:


Bob John
Bobcares Marketing Team [[email protected] ~]#



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.

[[email protected] ~]# tmpmail
[ Inbox for [email protected] ]
105578915 [email protected] Attachment Test Email
105576629 [email protected] Re: Tmpmail Test
105575154 [email protected] Tmpmail Test
[[email protected] ~]#

From the output, we know we received the email.

Then we will look for the attachment:

[[email protected] ~]# tmpmail 105578915

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

[[email protected] ~]# tmpmail -t 105578915
To: [email protected]
From: [email protected]
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
[[email protected] ~]#

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 *