A temporary email right from your terminal
Project description
A temporary email right from your terminal
tmpmail is a command line utility 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 argument followed by the command needed to launch the web browser of your choice.
Dependencies
Python dependencies (installed automatically with pip):
requestsbeautifulsoup4
System dependencies (required for full functionality):
w3m(or another browser for rendering HTML emails)xclip(or another clipboard utility for the--copyfeature)
Installation
Install with pip (Recommended)
# Install with pip
$ pip install tmpmail-cli
# Or with pipx for an isolated installation
$ pipx install tmpmail-cli
Install from source
$ git clone https://github.com/sdushantha/tmpmail.git
$ cd tmpmail
$ pip install .
Install locally (Legacy shell script)
# Download the tmpmail file and make it executable
$ curl -L "https://raw.githubusercontent.com/sdushantha/tmpmail/master/tmpmail" > tmpmail && chmod +x tmpmail
# Then move it somewhere in your $PATH. Here is an example:
$ mv tmpmail ~/bin/
AUR
tmpmail is available on the AUR, which is currently being maintained by Benjamin Bädorf
$ yay -S tmpmail-git
Pacstall (Debian/Ubuntu)
tmpmail is available on the pacstall-programs repository, which is being currently being maintained by wizard-28
$ pacstall -I tmpmail-bin
Nixpkgs
tmpmail is also available in the nix package collection (only unstable currently), which is maintained by legendofmiracles
Either add it to your system packages, install it with nix-env or try it out in a ephemeral nix-shell nix-shell -p tmpmail
Docker
requirements:
- docker
- clone this repo
$ docker build -t mail .; # Dockerfile available in source code
$ docker run -it mail;
Usage
$ tmpmail --help
tmpmail
tmpmail -h | --version
tmpmail -g [ADDRESS]
tmpmail [-t | -b BROWSER] -r | ID
When called with no option and no argument, tmpmail lists the messages in
the inbox and their numeric IDs. When called with one argument, tmpmail
shows the email message with specified ID.
-b, --browser BROWSER
Specify BROWSER that is used to render the HTML of
the email (default: w3m)
--clipboard-cmd COMMAND
Specify the COMMAND to use for copying the email address to your
clipboard (default: xclip -selection c)
-c, --copy
Copy the email address to your clipboard
-d, --domains
Show list of available domains
-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.
--version
Show version
Examples
Create random email
$ tmpmail --generate
xoithrjagpx@1secmail.net
Create custom email
$ tmpmail --generate mycustomemail@1secmail.com
mycustomemail@1secmail.com
View the inbox
$ tmpmail
[ Inbox for wdebivbyjor@1secmail.com ]
83414443 username@example.com Test Email
View the email
$ tmpmail 83414443
View the most recent email
$ tmpmail -r
View emails as pure text
$ tmpmail -t 83414443
To: wdebivbyjor@1secmail.com
From: username@example.com
Subject: Test Email
Hello World
[Attachments]
https://is.gd/aBCdEf [apple.jpg]
https://is.gd/AbCDeF [ball.jpg]
Credits
This script is heavily inspired by Mitch Weaver's 1secmail script
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tmpmail_cli-1.2.3.tar.gz.
File metadata
- Download URL: tmpmail_cli-1.2.3.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
586812f7a5bd8625c1dbdc8392019fed6d34744e835eb6bdc446af51520b7300
|
|
| MD5 |
d51353c7cf7e803dc774fc01b3c6b5be
|
|
| BLAKE2b-256 |
523de50b6b3ecd1bd061ce16bee32cf2a73ed84c9b172413ab89f255af14e5ee
|
File details
Details for the file tmpmail_cli-1.2.3-py3-none-any.whl.
File metadata
- Download URL: tmpmail_cli-1.2.3-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
141dd037b5fecfdb1c0f6e1f4ac01dd79e640ba91612113bcc335e493057d6d0
|
|
| MD5 |
fe384073cb5728d9375d554d8d175acf
|
|
| BLAKE2b-256 |
c41c25920bb760f154d78e17ed27ae4df8b9496ac2c35ec811a9570ad35f2681
|