Skip to main content
python-mailgun2
===============

[![Code Climate](https://codeclimate.com/github/ZeroCater/python-mailgun2/badges/gpa.svg)](https://codeclimate.com/github/ZeroCater/python-mailgun2)
[![Dependency Status](https://gemnasium.com/ZeroCater/python-mailgun2.svg)](https://gemnasium.com/ZeroCater/python-mailgun2)

A super simple Python API for interacting with [Mailgun](http://www.mailgun.com/).
Currently only supports sending messages. Powered by
[Requests](http://docs.python-requests.org/en/latest/).

Python 3 support should be there but is currently untested.

Installation:

```shell
pip install mailgun2
```

Usage:

```python
from mailgun2 import Mailgun
mailer = Mailgun('apikey', 'example.mailgun.org')
mailer.send_message(
'from@yourdomain.com',
['to@you.com', 'others@you.com'],
subject='Hi!',
text='Sweet.'
)
```

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
```

Pull requests welcome!

Metadata

Release files for mailgun3 0.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mailgun3 0.1.9
File Size Uploaded Provenance Actions
mailgun3-0.1.9.tar.gz 3.6 kB Without provenance Details for mailgun3-0.1.9.tar.gz

Release files / mailgun3-0.1.9.tar.gz

Download URL mailgun3-0.1.9.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1e63371ae0746620f04baf9b8eed67f69fc90a10370d421fc1375fc5e3fda44a
BLAKE2b-256 checksum
How to use checksums
38c025e327c10c6f2de429d0355cfe71e6f7871f4e91b9150c6665ff495dbe9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for mailgun3 0.1.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page