Dramatically simplify sending email from your python app.
Project description
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.
Compatible with Python 3.5+
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)
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
mailshake-2.1.tar.gz
(21.5 kB
view details)
Built Distribution
mailshake-2.1-py3-none-any.whl
(17.5 kB
view details)
File details
Details for the file mailshake-2.1.tar.gz
.
File metadata
- Download URL: mailshake-2.1.tar.gz
- Upload date:
- Size: 21.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7aeffaaa8574b797e788381abd89095fb89c7bc62a7df2f6aebd6505c61449a0 |
|
MD5 | 49ac5575a587359aa934d93553f98ffd |
|
BLAKE2b-256 | 2d64530eea4ebe99198d2ed6245632d6e9719c868a2d9de5f0f2cecf158a962d |
File details
Details for the file mailshake-2.1-py3-none-any.whl
.
File metadata
- Download URL: mailshake-2.1-py3-none-any.whl
- Upload date:
- Size: 17.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c8fe47ebb66fc254a613401f0cad6d3205da6b829bdff1ed3598c0a1d1b3c42 |
|
MD5 | b8da1726fed76db74356609536efbf3b |
|
BLAKE2b-256 | c340cd79040dbbfa0078153c2a9bfd937b3d6336656b4a9e578cbb87f2b6a6a4 |