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.2.tar.gz
(4.9 kB
view hashes)
Built Distribution
Close
Hashes for mailgun3_python-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c12bffe8d9acdd0c61d5f8ee7444fb5578825da9ae2378d4193af3ee89122ae8 |
|
MD5 | 73900db528947c31fa5745d8106776bf |
|
BLAKE2b-256 | 9367c8db2fdaefccfba9b3bd9aefdaec51388078f730e300aeb44844e2c06fbd |