Mailshake
Although Python makes sending email relatively easy via the smtplib module, this library provides a couple of light wrappers over it.
These wrappers make sending email extra quick, easy to test email sending during development, and provides support for platforms that can't use SMTP.
Mailers availiable:
- SMTPMailer
- AmazonSESMailer
- ToConsoleMailer (prints the emails in the console)
- ToFileMailer (save the emails in a file)
- ToMemoryMailer (for testing)
- DummyMailer (does nothing)
Usage:
from mailshake import SMTPMailer
mailer = SMTPMailer()
mailer.send(
subject='Hi',
text_content='Hello world!',
from_email='from@example.com',
to=['mary@example.com', 'bob@example.com']
)
You can also compose several messages and send them at the same time:
from mailshake import SMTPMailer, EmailMessage
mailer = SMTPMailer()
messages = []
email_msg = EmailMessage(
"Weekend getaway",
"Here's a photo of us from our trip.",
"from@example.com",
"bob@example.com"
)
email_msg.attach_file("picture.jpg")
messages.append(email_msg)
#…
mailer.send_messages(*messages)
Install for development
First, create an activate a virtualenv. eg:
python -m virtualenv .venv
source .venv/bin/activate
Then run pip install -e .[dev] or make install. This will install the library in editable mode and all its dependencies.
Metadata
Release files for mailshake 2.3
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 |
|---|---|---|---|---|
| mailshake-2.3.tar.gz | 19.1 kB | Without provenance | Details for mailshake-2.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mailshake-2.3-py3-none-any.whl | Python 3 | none | any | Details for mailshake-2.3-py3-none-any.whl |
Total release size: 36.3 kB
Release files / mailshake-2.3.tar.gz
| Download URL | mailshake-2.3.tar.gz |
|---|---|
| Size | 19.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7fd4f2b49419a363374008c15b2ce2c3342a0d06d0d7c7cfb37dd989e62f0e4f
|
|
BLAKE2b-256 checksum How to use checksums |
c6fbe67ddb075a95c090f9177d3eddde6990a34f290501403b113475b522f7e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / mailshake-2.3-py3-none-any.whl
| Download URL | mailshake-2.3-py3-none-any.whl |
|---|---|
| Size | 17.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e4e0b71abb5b61f105f5d5a966d7131790aeecf86d94bba7b92ff0b1ed2629e4
|
|
BLAKE2b-256 checksum How to use checksums |
05b15a9e321c666c0cbe49db2e28732771ce02a7c2f86c0824db5f43a80f8fd5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Security for mailshake 2.3
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.