I'm trying to send an automated mailgun email from my flask app on Google App Engine. It works fine when I run locally. However, even though it runs without error the email is not being sent.
Here is the code:
def send_simple_message(text):
url = 'https://api.mailgun.net/v3/{}/messages'.format('')
auth = ('api', '3822ba6d2b1ad202e83a4322a80c7600-87cdd773-683e02b1')
data = {
'from': 'Mailgun User <mailgun@{}>'.format('sandboxf04ggge3c1dc36e527c92f3a967e7f7c.mailgun.org'),
'to': 'example@gmail.com',
'subject': 'Simple Mailgun Example',
'text': text
}
response = requests.post(url, auth=auth, data=data)
response.raise_for_status()
Any thoughts?