Python Wrapper for Mailgun API
Project description
tm-mailgun
This module provides wrapper for Mailgun APIs.
Installation
pip install tm-mailgun
Usage
from tm_mailgun.mailgun import Mailgun
API_KEY = 'xxxxxxxxxxxx'
DOMAIN = 'xxx.abc.jp'
EMAIL = 'hr@abc.jp'
MAIL_FROM = 'from@abc.jp'
MAIL_SUBJECT = 'Test Mail'
MAIL_BODY = 'Hello World'
mailgun = Mailgun(DOMAIN, API_KEY)
mailgun.mail_from = MAIL_FROM
if mailgun.is_valid(EMAIL):
mailgun.messages(EMAIL, MAIL_SUBJECT, '', MAIL_BODY)
else:
print('[{}] is an ivalid email.'.format(EMAIL))
if mailgun.is_delivered(EMAIL):
print('[{}] is delivered successfully.'.format(EMAIL))
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
takeme_mailgun-1.0.5.tar.gz
(3.0 kB
view details)
Built Distribution
File details
Details for the file takeme_mailgun-1.0.5.tar.gz
.
File metadata
- Download URL: takeme_mailgun-1.0.5.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94006f15e80131d6382b8cd0e71d51d666b229d0c79914da7c2bccf799aea6cf |
|
MD5 | e8d15eb0731f6888b579701b8634064a |
|
BLAKE2b-256 | 97f732d52aad4b0b223e97541823e3f62abfbc54cba1e489b47cc9aadc77d71d |
File details
Details for the file takeme_mailgun-1.0.5-py3-none-any.whl
.
File metadata
- Download URL: takeme_mailgun-1.0.5-py3-none-any.whl
- Upload date:
- Size: 15.6 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/41.6.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0014d6ab94f450b6d520fd8d5fb8dab0897a1e9dedd0845614f15bc03ae737ef |
|
MD5 | fd459f97529b5df6691a4c5be8710faf |
|
BLAKE2b-256 | 62c5a93b1300f8cf199c410873a4ff3844923a76d978a6f207b8c6cb3b538f17 |