O'Reilly logo

Mastering Google App Engine by Mohsin Shafique Hijazee

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Receiving e-mails

Receiving e-mails is pretty much a simple thing in Google App Engine. First, you have to enable the incoming e-mails for your app. This can only be done in your app.yaml file (as there's nothing on the application settings when deployed). To do this, you add the following line to app.yaml:

inbound_services:
- mail

Now, how are the e-mails delivered to your app? Can you pull them on your own? The answer is that the e-mails are delivered to your application as HTTP POST requests. So, which URL do they hit? That's actually /_ah/mail/address, where address is the e-mail address to which the e-mail is sent.

The e-mail address should be of the following form:

account@appid.appspotmail.com

Here, account can be anything that you like, and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required