Skip to main content

Dramatically simplify sending email from your python app.

Project description

Mailshake logo


Build Status

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)


from mailshake import SMTPMailer

mailer = SMTPMailer()
    text_content='Hello world!',
    to=['', '']

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.",



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.

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-2.3.tar.gz (19.1 kB view hashes)

Uploaded source

Built Distribution

mailshake-2.3-py3-none-any.whl (17.2 kB view hashes)

Uploaded py3

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