Command-line SMTP email sending tool in pure Python
Project description
Intro
Littlemail is a command-line SMTP email sending tool in pure Python, which send one email per command.
The purpose of repo is to have a very simple and easy-to-use command-line SMTP email sending tool in pure Python. (I think mail or mailx is a bit complicated in use.)
Installation
$ pip install littlemail
Usage
Show help and default values for a few options:
$ python -m littlemail -h
Example:
$ python -m littlemail -s test -c hello -f 12345@qq.com --to 54321@qq.com -p abcde --smtp smtp.qq.com --protocol tls
-c is optional, which means you can send email with empty content.
And there are two other ways to fill content. Below are examples:
(1) By using echo and pipe, you can insert escape character in command line into your content:
$ echo -e 'hello\n\nI am xinlin-z!\n\nBR\nxinlin-z' | python -m littlemail <...>
(2) By using input redirection:
$ python -m littlemail <...> < email.txt
-a option can accept more than one attachments, like:
$ python -m littlemail <...> -a afile.tar.gz bfile.py cfile.txt <...>
If there is something wrong, try to add --debug option to check.
--to, --cc and --bcc options are all support multiple addresses.
-p is optional. When it's missing, littlemail tries to get password from
LITTLEMAIL_PASSWD environment variable.
API
There is an API you can invoke to send email in your code:
from littlemail import send_email
Have fun! ^___^
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 littlemail-0.31.tar.gz.
File metadata
- Download URL: littlemail-0.31.tar.gz
- Upload date:
- Size: 277.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ffd692c3597026ab7b7ddf98d623cbafb9e0d916b6310ad66f00d4204f8f900
|
|
| MD5 |
27e3745316d1c0c56c9fa963da5c1e6f
|
|
| BLAKE2b-256 |
38a34d7ef4dfd0efeea82118aed58f76786210988251b4d46e057783a5f9dada
|
File details
Details for the file littlemail-0.31-py3-none-any.whl.
File metadata
- Download URL: littlemail-0.31-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f41ea159b94b3bd587bfeb81156c1310d058b9e212ed22674f16f5ea89ac1cf4
|
|
| MD5 |
d7dca6be75f2f763e1334a44dc4e29dd
|
|
| BLAKE2b-256 |
d09c1c883cea73b7b6d8b8a9fea071d00d6abec899230fc2c57439c63ec878df
|