littlemail
Littlemail is a straight-forward command-line SMTP email sending tool in Python, which sends one email per command. (If you send many emails, every sending will make a new connection with the smtp server.)
Installation
$ pip install littlemail
Usage
There is no way to reduce parameters provided in command-line, since that's the way of email. So, please refer to the inline help for options you need. Fortunately, many options have default value.
$ python -m littlemail -h # inline help
Anyway, here is a minimal example and a few lines of explanation:
$ python -m littlemail -s test [-c hello] \
-f 12345@qq.com \
--to 54321@qq.com \
--smtp smtp.qq.com [-p abcdefg]
-c means the email content, which is optional. That means you can
send empty-content email. And this optional parameter enables the
capability of littlemail to get content from pipe (input
redirection), which might be easier for you to construct your message,
such as:
$ python -m littlemail <...> < my_email_content.txt
-s represents subject, which is mandatory and cannot be empty.
-p stands for password, and it is optional. When it's missing,
littlemail tries to get password from LITTLEMAIL_PASSWD
environment variable.
When something goes wrong, try --debug.
API
There is an API you can invoke to send email in your code:
# import
from littlemail import send_email
# signature
def send_email(subject: str,
*,
text: str = '',
contype: str = 'plain',
alist: list[str] = [],
to: list[str],
cc: list[str] = [],
bcc: list[str] = [],
fromaddr: str,
smtp: str,
port: int = 587,
timeout: int = 3,
protocol: str = 'tls',
passwd: str|None,
debug: bool = False) -> None: ...
api_test.py is used as an example and testcase for you to try,
have fun! ^___^
Metadata
Release files for littlemail 0.33
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 |
|---|---|---|---|---|
| littlemail-0.33.tar.gz | 6.2 kB | Without provenance | Details for littlemail-0.33.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| littlemail-0.33-py3-none-any.whl | Python 3 | none | any | Details for littlemail-0.33-py3-none-any.whl |
Total release size: 12.3 kB
Release files / littlemail-0.33.tar.gz
| Download URL | littlemail-0.33.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1cb4a87d7151aef13f03a520474d2fd5a58b1891b48ab569bbee0c3976c9ad39
|
|
BLAKE2b-256 checksum How to use checksums |
ea3f3644db517ae0c69fb9df5fd51dc42a808bcc0cc276cb408ac5d78afc2e0c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.0
|
Release files / littlemail-0.33-py3-none-any.whl
| Download URL | littlemail-0.33-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b03bf00c2c14b7eb5ed8f882ab1fe7ba2a0952be3a687d6d85659efc8bd9cb0c
|
|
BLAKE2b-256 checksum How to use checksums |
46b06f69722aec8563f60e465dad1942c174a42e84fc868afb3735fc5fdcee9e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.0
|
Security for littlemail 0.33
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.