Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Fork of tinysmtp with bug fixes and python 3 compatibility

Project Description

This is a fork of Rick Harris’s tinysmtp package with a few fixes and Python 3 compatibility.


with Mail().connect() as mail:
    msg = Message(
        '', 'Subject', [''], body='body')

Connections may be configured from a URL specified in an environment variable:

export MAILSEND_URL="smtp+tls://"

Or as individual variables:


Or in code:

mail = Mail('smtp://')
mail2 = Mail('',

Call mail.send to send a message:

mail = Mail('smtp://')
          recipients=['', ''],
          body='Hello everyone!',
          html='<p>Hello everyone!</p>',

Or use the message class to construct messages piecemeal:

msg = Message('', 'Hello!')
msg.body = 'Hello'
msg.recipients = [''] = ['']
msg.bcc = ['']

mail = Mail('smtp://')

To send multiple messages in a single connection, use Mail.connect:

with mail.connect() as conn:

0.1.4 (released 2017-08-27)

  • Bugfix: extra_headers option is now python 3 compatible

0.1.3 (released 2017-04-19)

  • Added ability to send stdlib email.message.Message objects via mailsend

0.1.2 (released 2016-09-02)

  • The mime structure of HTML emails is now compatible with Outlook 2011
  • The SMTPUTF8 extension is requested when messages contain utf-8 addresses. (feature is available in Python 3.5 only)

0.1.1 (released 2015-12-21)

  • Fixes for compatibility with envparse-0.2

0.1 (released 2015-12-19)

  • Forked from
  • Added configuration via URL (eg Connection('smtp://'))
  • Various bug fixes
  • Added rewrite_to argument to Mail class constructor method. This causes all messages to be rewritten to the given address(es), and is expected to be used for development/testing.
  • Added bcc argument to Mail class constructor method. This causes all messages to be bcc’d to the given address(es).
  • Added suppress_send argument to the Mail class constructor. This causes messages to not be sent (but may be still accessed via Mail.subscribe)
Release History

Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
mailsend-0.1.4-py2-none-any.whl (8.6 kB) Copy SHA256 Checksum SHA256 py2 Wheel Aug 27, 2017
mailsend-0.1.4.tar.gz (7.9 kB) Copy SHA256 Checksum SHA256 Source Aug 27, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting