skip to navigation
skip to content

mailgun2 1.1.0

A python client for Mailgun API v2

Originally at

A super simple Python API for interacting with Mailgun. Currently only supports sending messages. Powered by Requests.

Works with Python 3!


pip install mailgun2


from mailgun2 import Mailgun
mailer = Mailgun('', 'public_key', 'private_key')
    ['', ''],

Required arguments:

from_email: string of email address to set as sender
to: list or string of email address to send to

Optional arguments:

subject: string subject of the email
text: string body of the email. Either text or html is required.
html: string HTML of the email. Either text or html is required.
cc: list of cc addresses.
bcc: list of bcc addresses.
tags: list of mailgun tags to associate with the email.
reply_to: Convenience argument for setting the Reply-To header
headers: Extra headers for messages
inlines: List of file paths to attach inline to the message
attachments: List of (file name, content type, file handle) as a multipart attachment


See Contributing

Pull requests welcome!

File Type Py Version Uploaded on Size
mailgun2-1.1.0-py3-none-any.whl (md5) Python Wheel py3 2017-04-19 6KB
mailgun2-1.1.0.tar.gz (md5) Source 2016-05-17 4KB