Mailgun client for python
Project description
mailgun3_python
Python client for mailgun.
For detail:
Install
pip install mailgun3_python
Set API KEY from docsumo setting page as env variable MAILGUN_API_KEY
& MAILGUN_DOMAIN
or pass apikey parameter in Mailgun class.
export MAILGUN_API_KEY="key-c-fgrt456" >> ~/.bashrc
export MAILGUN_DOMAIN="example.com" >> ~/.bashrc
source ~/.bashrc
Example
from mailgun import Mailgun
mailgun = Mailgun()
# send email with attachment
mailgun.send_message("Text, <test@gmail.com>",
"bkrm.dahal@gmail.com",
"Docsumo: Automate invoice data capture at Docsumo",
'Hi, welcome to docsumo.',
files=['./invoice.pdf'])
# send message with saved template
mailgun.send_message_template("Text, <test@gmail.com>",
"bkrm.dahal@gmail.com",
"Docsumo: Automate invoice data capture at Docsumo",
"welcome_email",
{"company_name": "docsumo", "first_name": "bikram"})
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
mailgun3_python-0.1.3.tar.gz
(4.8 kB
view hashes)
Built Distribution
Close
Hashes for mailgun3_python-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a86042b6623e8561abb18b2ebcdd14940f1b075f3eb3a7bc011ff4d6d55c076 |
|
MD5 | 0112f164753338cfa1ac6a1e4f46c07c |
|
BLAKE2b-256 | b4fafb3aabb878da639dd3c17e2a9413972073d587830f95abf8afdb779749f8 |