skip to navigation
skip to content

Not Logged In

MailShake 0.9.1

Dramatically simplify sending email from your python app

Latest Version: 0.9.6

=================
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).
 
File Type Py Version Uploaded on Size
MailShake-0.9.1.tar.gz (md5) Source 2013-10-06 135KB
  • Downloads (All Versions):
  • 18 downloads in the last day
  • 296 downloads in the last week
  • 1398 downloads in the last month