Skip to content

Instantly share code, notes, and snippets.

@Gexos
Created October 14, 2014 00:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Gexos/288b81ca346e88f50a75 to your computer and use it in GitHub Desktop.
Save Gexos/288b81ca346e88f50a75 to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
import requests
request=requests.post(
"https://api.mailgun.net/v2/samples.mailgun.org/messages",
auth=("api", "key-3ax6xnjp29jd6fds4gc373sgvjxteol0"),
data={"from": "foo@example.com",
"to": "bar@example.com",
"subject": "Hello",
"text": "Testing some Mailgun awesomness!"})
print "Status: {0}".format(request.status_code)
print "Body: {0}".format(request.text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment