title: Is it possible to receive email bounce notifications for google app engine - python?
body: <p>I have a google endpoints project using pure python, I use the inbuilt <a href="https://cloud.google.com/appengine/docs/python/mail/sendingmail" rel="nofollow">mail</a> to send emails. But for some reasons emails doesn't reach the receiver (quota is not exhausted). So I thought to create a bounce notifier. I  have done this so far.</p>
  
  <p>app.yaml</p>
  
  <pre><code>inbound_services:
  - mail_bounce
  handlers:
  - url: /_ah/bounce
    script: applications.APPLICATION
    login: admin
  </code></pre>
  
  <p>applications.py</p>
  
  <pre><code>from app.api.bounce.api import Bounce
  
  APPLICATION = endpoints.api_server([Bounce])
  </code></pre>
  
  <p>bounce.py</p>
  
  <pre><code>import endpoints
  import logging
  
  from protorpc import remote, message_types
  
  from google.appengine.ext.webapp.mail_handlers import BounceNotification
  from google.appengine.ext.webapp.mail_handlers import BounceNotificationHandler
  from google.appengine.ext.webapp.mail_handlers import InboundMailHandler
  from app.messages.auth import OutputAdminUserMessage
  
  
  @endpoints.api(name='bounce', version='v1')
  class Bounce(remote.Service):
      @endpoints.method(message_types.VoidMessage, OutputAdminUserMessage,
                        path="bounce", http_method="POST",
                        name="bounce")
      def post(self, request):
          bounce = BounceNotification(request.POST)
          logging.info('Bounce original: %s', bounce.original)
          logging.info('Bounce notification: %s', bounce.notification)
  </code></pre>
  
  <p>And this doesn't seem to work this API isn't hit when I try to send an email to xyz@gmail.com. Any help is really appreciated.</p>