Skip to main content

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 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 can’t use SMTP.

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',
['mary@example.com', 'bob@example.com']
)
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)

--------
[MIT License](http://www.opensource.org/licenses/mit-license.php).

© 2011 by [Lúcuma labs](http://lucumalabs.com).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

MailShake-0.9.6.tar.gz (138.9 kB view details)

Uploaded Source

File details

Details for the file MailShake-0.9.6.tar.gz.

File metadata

  • Download URL: MailShake-0.9.6.tar.gz
  • Upload date:
  • Size: 138.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for MailShake-0.9.6.tar.gz
Algorithm Hash digest
SHA256 9a38ddfde77dc0de477b39c9c1dd5ab31b0a727068e1839c228369919adbcd5f
MD5 f9407ca188d4591b5daa37b7811e0bf3
BLAKE2b-256 b87003b02c791856e53a72b23401add3e9259a1200cdb64313bcbb409627c1d2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page