Skip to content

Instantly share code, notes, and snippets.

@kiarashplusplus
kiarashplusplus / .py
Created January 9, 2016 23:27
AWS Lambda + Mailgun
from __future__ import print_function
import base64, urllib, urllib2
api_key = "api:" + "key-MAILGUN_KEY"
routes_url = 'http://mailgun.net/api/routes.xml'
messages_url = 'http://mailgun.net/api/messages.txt'
def create_routes(pattern, destination):
post_headers = {
'Authorization': 'Basic {0}'.format(base64.b64encode(api_key)),
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="content-type">
<meta content="noindex, nofollow" name="robots">
<meta content="noindex, nofollow" name="googlebot">
<script src="https://code.jquery.com/jquery-1.11.3.min.js" type=
"text/javascript">
</script>