Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
05e51bd
Using emptyinbox.me API. Message list working
shivaenigma Aug 8, 2025
e34e389
Showing text and html content
shivaenigma Aug 8, 2025
03a56f4
Displaying message subjects
shivaenigma Aug 8, 2025
57a897e
Fixed converting text only emails to html and vice versa
shivaenigma Aug 8, 2025
6452e0f
Updated command to generate and list inboxes
shivaenigma Aug 9, 2025
be71697
Updated command line for listing inboxes
shivaenigma Aug 12, 2025
e5d05d5
Using config file
shivaenigma Aug 12, 2025
ac27d70
Commiting empty config file
shivaenigma Aug 12, 2025
26fc548
Changed APIKey file
shivaenigma Aug 12, 2025
a36ffca
Updated README
shivaenigma Aug 12, 2025
0f0d6a2
Udpated README
shivaenigma Aug 12, 2025
65a85ad
Udpated README
shivaenigma Aug 12, 2025
55d668c
Updated README
shivaenigma Aug 12, 2025
0477eb2
Updated README. Removed install instructions
shivaenigma Aug 13, 2025
e64450a
Updated README
shivaenigma Aug 13, 2025
3f3a7cd
Removed unused code
shivaenigma Aug 21, 2025
2750c9a
Bringing back code required for mail functionality
shivaenigma Aug 21, 2025
2825a38
Removed unused code
shivaenigma Aug 21, 2025
b05f702
Added command line to auto detect activation code
shivaenigma Aug 21, 2025
8e246d8
Added logic to detect activation code
shivaenigma Aug 21, 2025
c82908b
Updated README and added clipboard command
shivaenigma Aug 21, 2025
2f7f9e7
Updated README
shivaenigma Aug 21, 2025
a1ce2e9
Enable newline parsing
shivaenigma Aug 21, 2025
18614cb
Updated demo image
shivaenigma Aug 21, 2025
abf7f84
Minor documentation changes
shivaenigma Aug 21, 2025
a7de689
Creating tmp directory if it doesn't exist
shivaenigma Aug 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions Dockerfile

This file was deleted.

100 changes: 33 additions & 67 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<h1 align="center">
<img src="images/logo.png">
</h1>
<p align="center"> A temporary email right from your terminal written in POSIX sh</p><br>
<p align="center"> A temporary email right from your terminal written in bash</p><br>

<img src="images/demo.gif" align="right"> `tmpmail` is a command line utility written in POSIX `sh` that allows you to create a temporary email address
and receive emails to the temporary email address. It uses 1secmail's [API](https://www.1secmail.com/api/)
to receive emails.
<img src="images/demo.gif"/> `tmpmail` is a command line utility written in POSIX `bash` that allows you to create multiple inboxes
and receive temporary emails to these inboxes. It uses [emptyinbox.me API](https://emptyinbox.me/docs.html) 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
Expand All @@ -21,53 +20,22 @@ use the `--browser` argument followed by the command needed to launch the web br
- [`jq`](https://github.com/stedolan/jq)
- `xclip`

## Installation
### Install locally

## First time Setup
Get your APIKEY from https://emptyinbox.me
```bash
# 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](https://aur.archlinux.org/packages/tmpmail-git/), which is currently being maintained by [Benjamin Bädorf](https://github.com/b12f)

```bash
$ yay -S tmpmail-git
```

### [Pacstall](https://github.com/pacstall/pacstall) (Debian/Ubuntu)
`tmpmail` is available on the [pacstall-programs repository](https://github.com/pacstall/pacstall-programs/blob/master/packages/tmpmail-bin/tmpmail-bin.pacscript), which is being currently being maintained by [wizard-28](https://github.com/wizard-28)

```
$ pacstall -I tmpmail-bin
cp config.txt.sample config.txt
Edit config.txt to set APIKEY
```

### Nixpkgs
`tmpmail` is also available in the [nix package collection (only unstable currently)](https://search.nixos.org/packages?channel=unstable&show=tmpmail&from=0&size=50&sort=relevance&query=tmpmail), which is maintained by [legendofmiracles](https://github.com/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](https://www.docker.com/)
- clone this repo

```bash
$ docker build -t mail .; # Dockerfile available in source code
$ docker run -it mail;
```

## Usage
```console
$ tmpmail --help
tmpmail
tmpmail -h | --version
tmpmail -g [ADDRESS]
tmpmail -g
tmpmail -l
tmpmail [--clipboard-cmd COMMAND] -a
tmpmail [-t | -b BROWSER] -r | ID

When called with no option and no argument, tmpmail lists the messages in
Expand All @@ -78,15 +46,14 @@ shows the email message with specified ID.
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
Specify the COMMAND to use for copying the activation code 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
-l, --list
Show list of available inboxes
-g, --generate
Generate a new email inbox
-a, --acode
Auto Detect and copy activation code from recent email
-h, --help
Show help
-r, --recent
Expand All @@ -102,46 +69,45 @@ shows the email message with specified ID.
Create random email
```console
$ tmpmail --generate
[email protected]
```

Create custom email
```console
$ tmpmail --generate [email protected]
[email protected]
[email protected]
```

View the inbox
```console
$ tmpmail
[ Inbox for [email protected] ]

83414443 [email protected] Test Email
86acd15c [email protected] New email here
f4174aed [email protected] Test email
0ca9e983 [email protected] This is the subject
5d9aac58 [email protected] New email here
298baf00 [email protected] This is the subject

```

View the email
```console
$ tmpmail 83414443
$ tmpmail 086acd15c
```

View the most recent email
```console
$ tmpmail -r
```

Copy activation code from recent email to clipboard
```console
$ tmpmail -a
Activation code 685539 copied to clipboard
```

View emails as pure text
```console
$ tmpmail -t 83414443
To: [email protected]
To: [email protected]
From: [email protected]
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`](https://github.com/mitchweaver/bin/blob/master/OLD/1secmail) script
This script is forked from https://github.com/sdushantha/tmpmail
1 change: 1 addition & 0 deletions config.txt.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
APIKEY=yourapikey
Binary file modified images/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading