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!

Python wrapper for Mandrill Inbound

Project Description
# Mandrill Inbound Python Wrapper [![Build Status](](

This is a simple API wrapper for [Mandrill's inbound email webhook](
in Python inspired by this other Python wrapper library I made for [Postmark Inbound](

## Install

Using Github:

git clone git://

Using pip:

pip install python-mandrill-inbound

Using easy_install:

easy_install python-mandrill-inbound


from mandrill_inbound import MandrillInbound

# Load from JSON string
json_data = open('./tests/fixtures/valid_http_post.json').read()
inbound = MandrillInbound(json=json_data)

# Load Python dictionary
json_data = json.loads(open('./tests/fixtures/valid_http_post.json').read())
inbound = MandrillInbound(source=json_data)

# Content
print inbound.subject
print inbound.sender
print inbound.recipients
print inbound.message_id
print inbound.mailbox_hash
print inbound.html_body
print inbound.text_body
print inbound.send_date
print inbound.ts

# Spam and Spoofing Detection
print inbound.spf
print inbound.dkim
print inbound.spam_score

# headers
print inbound.headers # default to get all headers
print inbound.headers['MIME-Version']
print inbound.headers['Received-SPF']

# attachments
print inbound.has_attachments # boolean
attachments = inbound.attachments

first_attachment = attachments[0]

second_attachment = attachments[1]
print second_attachment.content_length

for a in attachments:
print a.content_type
print'./tests/', ['image/png'])

# raw data
print inbound.source
print inbound.msg

Bug tracker

Have a bug? Please create an issue here on GitHub!


* Fork
* Write tests
* Write Code
* Pull request

Thanks for your help.


MIT License
Release History

Release History

This version
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
python-mandrill-inbound-0.0.4.tar.gz (4.7 kB) Copy SHA256 Checksum SHA256 Source Aug 10, 2014

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