BounceNotificationHandler is provided by the
google.appengine.ext.webapp.mail_handlerspackage.
BounceNotificationHandler is a base class which you must
subclass and override the receive() method, as shown in this
example:
import logging
import webapp
from google.appengine.ext.webapp.mail_handlers import BounceNotification
from google.appengine.ext.webapp.mail_handlers import BounceNotificationHandler
class BounceLogger(BounceNotificationHandler):
def receive(self, bounce_notification):
logging.info('Received bounce from %s'
bounce_notification.notification_from)
# Map bounce handler to application
application = webapp.WSGIApplication([
BounceLogger.mapping(),
])
"""
Class Methods
The BounceNotificationHandler class provides the following
class method:
- mapping()
-
Convenience method that maps the handler class to the application.
Returns a tuple (bounce handler URL path, bounce handler class).
Instance Methods
BounceNotificationHandler instances have the following
methods:
- post()
- Transforms the POST body to the bounce request.
- receive(bounce_notification)
- You must override this method in the subclass. It will be called with
a
BounceNotificationobject.