Skip to main content

Python Wrapper for Mailgun API

Project description

takeme-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.8.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

takeme_mailgun-1.0.8-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: takeme_mailgun-1.0.8.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.8.tar.gz
Algorithm Hash digest
SHA256 9fa3f3310b64af123e1aaf6f5580cbb8f2934a7e550a151dceac6cfebcc8126c
MD5 b936d5bcb9f5587def4a0e4dbb22b7a4
BLAKE2b-256 ff646c7d890367db5896486ab65ee1604764334e9681ca0392064a23f4cdc511

See more details on using hashes here.

File details

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

File metadata

  • Download URL: takeme_mailgun-1.0.8-py3-none-any.whl
  • Upload date:
  • Size: 15.5 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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 4c86040f780cb941ab87fe631e5b9b05b474a125708c388fc479505d5dc0d6d4
MD5 5019a069369fd059daf2f0c2ddf9a1fc
BLAKE2b-256 c509145a1e57d3f3a01c077591a416a1010e79a12c3a4bf0ce9dd13641003e61

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