A python client for Mailgun API v2
Project description
Originally at https://github.com/ZeroCater/python-mailgun2
A super simple Python API for interacting with Mailgun. Currently only supports sending messages. Powered by Requests.
Works with Python 3!
Installation
pip install mailgun2
Usage
from mailgun2 import Mailgun
mailer = Mailgun('example.mailgun.org', 'public_key', 'private_key')
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
Contributing
See Contributing
Pull requests welcome!
Distributing
pip install twine
python setup.py sdist bdist_wheel
twine upload dist/*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mailgun2-2.0.0.tar.gz.
File metadata
- Download URL: mailgun2-2.0.0.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
856f095eca63cad46c1851d3823a000db254b369bf213bb002a8212c2898e9e2
|
|
| MD5 |
a757cb6626df78c79fe86a47043f8cc2
|
|
| BLAKE2b-256 |
8c185b24f6fa9b993db2a4af9cdf6d47d8198502656e28bc99912f7989f200b9
|
File details
Details for the file mailgun2-2.0.0-py3-none-any.whl.
File metadata
- Download URL: mailgun2-2.0.0-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a8e617e87042f991308952214f5bc5508dfd711dd001176237fd2eac765c63a
|
|
| MD5 |
096be19869bfe3d3ad8cf2c68c76cdde
|
|
| BLAKE2b-256 |
16fd632dd0eef8358c897d6d4802b2bf570cf15f2baa84972b67cdf8020a26bd
|