Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Google App Engine

You're reading from   Mastering Google App Engine Build robust and highly scalable web applications with Google App Engine

Arrow left icon
Product type Paperback
Published in Oct 2015
Publisher
ISBN-13 9781784396671
Length 368 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

Putting it all together


Now that we are done exploring everything about e-mails on Google App Engine, it is time to put it all together. We are going to develop an app that is similar to what we did in the last chapter. You give it a URL and an e-mail address. The page is downloaded, compressed, and stored in the datastore like before. But besides that, we also e-mail that page to the given e-mail address. In case the sending of the e-mail fails, we handle the bounce notifications and record this information in logs.

In case the user replies to the e-mail, we parse the incoming e-mails and record the feedback as well. Let's go through everything file by file. The first one is app.yaml:

application: your-app-id
version: 1 
runtime: python27 
api_version: 1 
threadsafe: true 

inbound_services: 
- mail 
- mail_bounce 

handlers: 
# Emails 
- url: /_ah/mail/.+ 
  script: email_handler.app 
  login: admin 
# Bounce backs 
- url: /_ah/bounce 
  script: email_handler.app 
  login: admin 
# Normal...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime