Receiving users' data as e-mail messages
A less common but useful feature for a web application is the ability to receive e-mail messages from its users: for example, a Customer Relationship Management (CRM) application could open a support ticket after receiving an e-mail sent out from a user to a certain address, say, support@example.com
.
To show how this works on App Engine, we add the ability for our users to create notes by sending e-mail messages to the Notes application: the e-mail subject will be used for the title, the message body for the note content, and every file attached to the e-mail message will be stored on Cloud Storage and be attached to the note as well.
App Engine applications can receive e-mail messages at any address of the <string>@<appid>.appspotmail.com
form; messages are then transformed to HTTP requests to the /_ah/mail/<address>
URL, where a request handler will process the data.
Before we start, we need to enable the incoming e-mail service...