Skip to main content

Python Wrapper for Mailgun API

Project description

tm-mailgun

This module provides wrapper for Mailgun APIs.

Installation

pip install tm-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.6.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: takeme_mailgun-1.0.6.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.6.tar.gz
Algorithm Hash digest
SHA256 f0904e93f1a5814b99630010720964db34a360befac3f60101341e7e44b6d204
MD5 6a93e4dcf9d879a3765f904e2b4a2cc7
BLAKE2b-256 38bf4b68781b705d9421f8b6bdf3051c966bb06b0c212591a1385c46e0e544e9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: takeme_mailgun-1.0.6-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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 d1a4164a142752378714383a0a46b124afd6490a3f8cdb18a54a0dd96829ce01
MD5 0b1881c7f405c24d067e5c9b7815ca7c
BLAKE2b-256 5a5b48211c145afc552690e3e847d5c190031276f500788230e2c1ffc39b692d

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