python-mailgun2
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.
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!
Metadata
Release files for mailgun2 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mailgun2-2.0.1.tar.gz | 6.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mailgun2-2.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.6 kB
Release files / mailgun2-2.0.1.tar.gz
| Download URL | mailgun2-2.0.1.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
51147f07acd8b62bd7450425f3499370d0bc07ee2b18668eb5394cb9bc191c2a
|
|
BLAKE2b-256 checksum How to use checksums |
e2d197d3e572407f50e76c226b6d8841bf9f5db3f2c75b98fc6745296c739453
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|
Release files / mailgun2-2.0.1-py3-none-any.whl
| Download URL | mailgun2-2.0.1-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5bee53422f685d8b43c52210f510fb1b0bddc2b8f796123bb5264644a9c07d65
|
|
BLAKE2b-256 checksum How to use checksums |
469c47b72a9014504b07315e0ddc86fb79d93a64e3800e905b984afafd17927c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|