MailShake
Dramatically simplify sending email from your python app
Dramatically simplify sending email from your python app
To install this package, run one of the following:
=================
Although Python makes sending email relatively easy via the smtplib module, this library provides a couple of light wrappers over it.
These wrappers are provided to make sending email extra quick, to make it easy to test email sending during development, and to provide support for platforms that cant use SMTP.
Usage::
from mailshake import SMTPMailer
mailer = SMTPMailer()
mailer.send(
subject='Hi',
text_content='Hello world!',
from_email='[email protected]',
to=['[email protected]', '[email protected]']
)
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.',
'[email protected]',
['[email protected]', '[email protected]']
)
email_msg.attach("picture.jpg")
messages.append(email_msg)
mailer.send_messages(messages)
Mailers availiable: * SMTPMailer * AmazonSESMailer
and:
* ToConsoleMailer (prints the emails in the console)
* ToFileMailer (save the emails in a file)
* ToMemoryMailer (for testing)
* DummyMailer (does nothing)
:copyright: Juan-Pablo Scaletti <http://jpscaletti.com>_.
:license: MIT, see LICENSE for more details.
Summary
Dramatically simplify sending email from your python app
Last Updated
May 20, 2016 at 02:08
License
MIT license (see LICENSE)
Supported Platforms