Skip to content

Instantly share code, notes, and snippets.

@jacobian
Created April 4, 2013 18:25
Show Gist options
  • Save jacobian/5312800 to your computer and use it in GitHub Desktop.
Save jacobian/5312800 to your computer and use it in GitHub Desktop.
import requests
requests.post(
'https://api.mailgun.net/v2/%s/messages' % MAILGUN_DOMAIN
auth = ("api", MAILGUN_API_KEY,
data = {
"from": from_address,
"to": to_address
"subject": subject_line
"text": body_plain,
"html": body_html,
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment