Skip to content

Generate temporary email addresses and say NO to spam/promotion mails on your official ids.

License

Notifications You must be signed in to change notification settings

HemantSachdeva/TempMail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A temporary email right from your terminal written in bash


tempmail is a command line utility written in bash that allows you to create a temporary email address and receive emails to the temporary email address. It uses 1secmail's API to receive emails.

By default w3m is used to render the HTML emails on the terminal. But if you prefer another text based web browser or would rather view the email in a GUI web browser such as Firefox, simply use the --browser or -b argument followed by the command needed to launch the web browser of your choice.



Dependencies

  • w3m
  • curl
  • jq

Installation

# Download the tempmail file and make it executable
$ curl -L "https://git.io/tempmail" > tempmail && chmod +x tempmail

# Then move it somewhere in your $PATH. Here is an example:
$ mv tempmail ~/bin/ || sudo mv tempmail /bin/

Usage

$ tempmail --help
tempmail
tempmail -h | -v | -l | -d
tempmail -g [ADDRESS]
tempmail [-t | -b BROWSER] -r | ID

When called with one argument, tempmail
shows the email message with specified ID.

-b, --browser BROWSER
        Specify BROWSER (default: w3m) that is used to render the HTML of
        the email
-l, --list
        List all the received emails
-d, --directory
        Set a custom directory to store everything related to 'tempmail'
-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.
-v, --version
        Show version

Examples

Create random email

$ tempmail --generate
gibrish@1secmail.net

Create custom email

$ tempmail --generate mycustomemail@1secmail.com
custom@1secmail.com

View the inbox

$ tempmail
[ Inbox for custom@1secmail.com ]

77229944   username@example.com   Test Email

View the email

$ tempmail 77229944

View the most recent email

$ tempmail -r

View emails as pure text

$ tempmail -t 77229944
To: custom@1secmail.com
From: username@example.com
Subject: Greetings from Temp Mail

Hello Temp Mail service user.

[Attachments]
logo.png

Credits

This script is heavily inspired by Mitch Weaver's 1secmail script

About

Generate temporary email addresses and say NO to spam/promotion mails on your official ids.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published