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 ...
Get Mastering Google App Engine now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.