Skip to content

docsumo/mailgun3_python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mailgun3_python

Python client for mailgun.

Documentation Status

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, <[email protected]>", 
                    "[email protected]", 
                    "Docsumo: Automate invoice data capture at Docsumo", 
                    'Hi, welcome to docsumo.', 
                    files=['./invoice.pdf'])

# send message with saved template
mailgun.send_message_template("Text, <[email protected]>", 
                                "[email protected]", 
                                "Docsumo: Automate invoice data capture at Docsumo", 
                                "welcome_email", 
                                {"company_name": "docsumo", "first_name": "bikram"})

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published