This is a command line interface and python web-api wrapper for mail.tm.
The api is documented here.
Dependencies
xclip or xsel for clipboard copying.
A browser to open incoming html emails.
Installation
With pip
pip install pymailtm
In a virtual env
python -m venv .venv
source .venv/bin/activate
pip install pymailtm
Usage
The utility can be called with:
pymailtm
Remember that if you are in a virtual env you need to activate it first.
By default the command recover the last used account, copy it to the clipboard and wait for a new message to arrive: when it does, it's opened in the browser in a quick&dirty html view.
Exit the waiting loop by pressing Ctrl+c.
Calling the utility with the flag -l will print the account credentials, open
in the browser the mail.tm client and exit.
The flag -n can be used to force the creation of a new account.
Security warnings
This is conceived as an insecure, fast throwaway temp mail account generator.
DO NOT use it with sensitive data.
Mails that arrive while the utility is running will be saved in plain text
files in the system temporary folder (probably /tmp/) so that they can be
opened by the browser.
The last used account's data and credentials will be saved in
plain text in ~/.pymailtm.
Development
pip install invoke poetry
Now clone the git repo:
git clone git@github.com:CarloDePieri/pymailtm.git
cd pymailtm
inv install
This will try to create a virtualenv based on python3.7 and install there all
project's dependencies. If a different python version is preferred, it can be
selected by specifying the --python (-p) flag like this:
inv install -p python3.8
The script can now be run directly by launching inv run. It also accepts flags,
for example:
inv run -n
The test suite can be run with commands:
inv test # run the test suite
inv test --full # run even tests that requires a graphical environment
inv test-spec # run the tests while showing the output as a spec document
inv test-cov # run the tests suite and produce a coverage report
Tests take advantage of vcrpy to cache network requests and responses. If you need to clear this cache run:
inv clear-cassettes
To test the github workflow with act:
inv act-dev # test the dev workflow
inv act-dev -c shell # open a shell in the act container (the above must fail first!)
inv act-dev -c clean # stop and delete a failed act container
Metadata
Release files for pymailtm 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pymailtm-1.1.1.tar.gz | 18.8 kB | Without provenance | Details for pymailtm-1.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pymailtm-1.1.1-py3-none-any.whl | Python 3 | none | any | Details for pymailtm-1.1.1-py3-none-any.whl |
Total release size: 37.8 kB
Release files / pymailtm-1.1.1.tar.gz
| Download URL | pymailtm-1.1.1.tar.gz |
|---|---|
| Size | 18.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2ba80a89de878ae622904570e1f52e02c792b3f6dbd26b8d4821c36114797f7a
|
|
BLAKE2b-256 checksum How to use checksums |
5434047a591640107ae3e7473605dc6e7ad995847f1a1593adb2254812fb90a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.14 CPython/3.7.13 Linux/5.18.3-arch1-1
|
Release files / pymailtm-1.1.1-py3-none-any.whl
| Download URL | pymailtm-1.1.1-py3-none-any.whl |
|---|---|
| Size | 19.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e42865ad24de4fc3629e453278f21a5e3e9c438e3f05c51fdaaedef0e943c87a
|
|
BLAKE2b-256 checksum How to use checksums |
b5f16c312e6981c9082005fd763b25f07590aef51748f6e9290d3deb612e0e7a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.14 CPython/3.7.13 Linux/5.18.3-arch1-1
|
Security for pymailtm 1.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.