![]() |
App Engine Python SDK
v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
|
Public Member Functions | |
def | update_from_mime_message |
def | bodies |
def | to_mime_message |
Public Attributes | |
alternate_bodies | |
Static Public Attributes | |
tuple | PROPERTIES |
ALLOW_BLANK_EMAIL = True | |
Parsed email object as recevied from external source. Has a date field and can store any number of additional bodies. These additional attributes make the email more flexible as required for incoming mail, where the developer has less control over the content. Example Usage: # Read mail message from CGI input. message = InboundEmailMessage(sys.stdin.read()) logging.info('Received email message from %s at %s', message.sender, message.date) enriched_body = list(message.bodies('text/enriched'))[0] ... Do something with body ...
def google.appengine.api.mail.InboundEmailMessage.bodies | ( | self, | |
content_type = None |
|||
) |
Iterate over all bodies. Args: content_type: Content type to filter on. Allows selection of only specific types of content. Can be just the base type of the content type. For example: content_type = 'text/html' # Matches only HTML content. content_type = 'text' # Matches text of any kind. Yields: Tuple (content_type, payload) for all bodies of message, including body, html and all alternate_bodies in that order.
def google.appengine.api.mail.InboundEmailMessage.to_mime_message | ( | self | ) |
Convert to MIME message. Adds additional headers from inbound email. Returns: MIME message instance of payload.
def google.appengine.api.mail.InboundEmailMessage.update_from_mime_message | ( | self, | |
mime_message | |||
) |
Update values from MIME message. Copies over date values. Args: mime_message: email.Message instance to copy information from.
|
static |