![]() |
App Engine Python SDK
v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
|
Public Member Functions | |
def | __init__ |
def | decode |
def | __eq__ |
def | __hash__ |
def | copy_to |
def | to_mime_message |
def | __str__ |
def | __repr__ |
Public Attributes | |
payload | |
charset | |
encoding | |
Wrapper for a payload that contains encoding information. When an email is received, it is usually encoded using a certain character set, and then possibly further encoded using a transfer encoding in that character set. Most of the times, it is possible to decode the encoded payload as is, however, in the case where it is not, the encoded payload and the original encoding information must be preserved. Attributes: payload: The original encoded payload. charset: The character set of the encoded payload. None means use default character set. encoding: The transfer encoding of the encoded payload. None means content not encoded.
def google.appengine.api.mail.EncodedPayload.__init__ | ( | self, | |
payload, | |||
charset = None , |
|||
encoding = None |
|||
) |
Constructor. Args: payload: Maps to attribute of the same name. charset: Maps to attribute of the same name. encoding: Maps to attribute of the same name.
def google.appengine.api.mail.EncodedPayload.__eq__ | ( | self, | |
other | |||
) |
Equality operator. Args: other: The other EncodedPayload object to compare with. Comparison with other object types are not implemented. Returns: True of payload and encodings are equal, else false.
def google.appengine.api.mail.EncodedPayload.__hash__ | ( | self | ) |
Hash an EncodedPayload.
def google.appengine.api.mail.EncodedPayload.__repr__ | ( | self | ) |
Basic representation of encoded payload. Returns: Payload itself is represented by its hash value.
def google.appengine.api.mail.EncodedPayload.__str__ | ( | self | ) |
String representation of encoded message. Returns: MIME encoded representation of encoded payload as an independent message.
def google.appengine.api.mail.EncodedPayload.copy_to | ( | self, | |
mime_message | |||
) |
Copy contents to MIME message payload. If no content transfer encoding is specified, and the character set does not equal the over-all message encoding, the payload will be base64 encoded. Args: mime_message: Message instance to receive new payload.
def google.appengine.api.mail.EncodedPayload.decode | ( | self | ) |
Attempt to decode the encoded data. Attempt to use pythons codec library to decode the payload. All exceptions are passed back to the caller. Returns: Binary or unicode version of payload content.
def google.appengine.api.mail.EncodedPayload.to_mime_message | ( | self | ) |
Convert to MIME message. Returns: MIME message instance of payload.