Makes sending emails easy and DRY — For Python 3.
Branch: master
Clone or download
Latest commit 57d97cd Jan 23, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs Add every requirement to RTFD requirements file Jan 16, 2019
.gitignore Add sphinx documentation Jan 16, 2019
LICENSE Initial commit Jan 12, 2019 Add agenda to README Jan 23, 2019 Fixes #2. Bump to v0.0.5 Jan 23, 2019
readthedocs.yml Use Python3 in readthedocs Jan 16, 2019
requirements.txt Add docstrings and requirements.txt Jan 15, 2019 Fixes #2. Bump to v0.0.5 Jan 23, 2019


Makes sending emails easy and DRY — For Python 3.

PyPI version

Drymail is a minimalist wrapper over Python’s existing smtplib and email libraries, designed to be friendly but unrestrictive. Here’s how you might send a simple email with an attachment using drymail.

from drymail import SMTPMailer, Message

client = SMTPMailer(host='', user='johndoe', password='password', tls=True)
message = Message(subject='Congrats on the new job!', sender=('John Doe', ''), 
                  receivers=[('Jane Doe', ''), ''], text='When is the party? ;)')
with open('congrats.pdf', 'rb') as pdf_file:
    message.attach(filename='congrats.pdf',, mimetype='application/pdf')



  • Supports creating email with HTML content, plaintext content, or both!
  • Supports mentioning contacts in the “John Doe" <> format.
  • Support standard headers like CC, BCC, Reply-To and Authors.
  • Supports injecting custom headers.
  • Supports adding attachments.
  • And most importantly — the library being minimalist, it doesn’t restrict you in any way like some of the most fancier email frameworks do.


Install drymail by running —

$ pip3 install drymail


Documentation is available at


  • Test suite.
  • Restructure the Message class to handle dynamic prepare.


All kinds of contribution are welcome.


This project is licensed under the MIT license.