def __init__(self, post_vars):
    """Constructs a new BounceNotification from an HTTP request.

    Properties:
      original: a dict describing the message that caused the bounce.
      notification: a dict describing the bounce itself.
      original_raw_message: the raw message that caused the bounce.

    The 'original' and 'notification' dicts contain the following keys:
      to, from, subject, text

    Args:
      post_vars: a dict-like object containing bounce information.
          This is typically the self.request.POST variable of a RequestHandler
          object. The following keys are expected in the dict:
            original-from
            original-to
            original-subject
            original-text
            notification-from
            notification-to
            notification-subject
            notification-text
            raw-message

    Raises:
      InvalidBounceNotification if any of the expected fields are missing.
    """
    try:
      self.__original = {}
      self.__notification = {}
      for field in ['to', 'from', 'subject', 'text']:
        self.__original[field] = post_vars['original-' + field]
        self.__notification[field] = post_vars['notification-' + field]

      self.__original_raw_message = mail.InboundEmailMessage(
          post_vars['raw-message'])
    except __HOLE__, e:
      raise InvalidBounceNotificationError(e[0])
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/webapp/mail_handlers.py/BounceNotification.__init__