Skip to main content

Python Wrapper for Mailgun API

Project description

tm-mailgun

This module provides wrapper for Mailgun APIs.

Installation

pip install takeme-mailgun

Usage

import takeme_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 = takeme_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.7.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

takeme_mailgun-1.0.7-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file takeme_mailgun-1.0.7.tar.gz.

File metadata

  • Download URL: takeme_mailgun-1.0.7.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

Hashes for takeme_mailgun-1.0.7.tar.gz
Algorithm Hash digest
SHA256 697d97c8a744cd96a0a498e229529b433d37389eefb7d9e7c48a883e76c395bf
MD5 a2a98810d19dc85ec3d5eb2682294da8
BLAKE2b-256 aa894b46e6e6f21750dd6d1a490247af6ff715d988ad6e6560f3196a05d30460

See more details on using hashes here.

File details

Details for the file takeme_mailgun-1.0.7-py3-none-any.whl.

File metadata

  • Download URL: takeme_mailgun-1.0.7-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

Hashes for takeme_mailgun-1.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 9fbf21ebdde3df7f3edf51ae7b3eff328166eda4fec0cabce3d76a460a924471
MD5 6f11d1ac057399f5a79bcf35811cec0b
BLAKE2b-256 a21d9d90e8394823ec2f151b3cb016b38e0c66fc184840111b79a84f3dfb2b0b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page