![]() |
App Engine Python SDK
v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
|
Public Member Functions | |
def | check_initialized |
def | CheckInitialized |
def | ToProto |
def | __setattr__ |
def | update_from_mime_message |
Public Attributes | |
to | |
cc | |
bcc | |
Static Public Attributes | |
tuple | PROPERTIES = set(_EmailMessageBase.PROPERTIES | set(('headers',))) |
Main interface to email API service. This class is used to programmatically build an email message to send via the Mail API. The usage is to construct an instance, populate its fields and call Send(). Example Usage: An EmailMessage can be built completely by the constructor. EmailMessage(sender='sender@nowhere.com', to='recipient@nowhere.com', subject='a subject', body='This is an email to you').Send() It might be desirable for an application to build an email in different places throughout the code. For this, EmailMessage is mutable. message = EmailMessage() message.sender = 'sender@nowhere.com' message.to = ['recipient1@nowhere.com', 'recipient2@nowhere.com'] message.subject = 'a subject' message.body = 'This is an email to you') message.check_initialized() message.send()
def google.appengine.api.mail.EmailMessage.__setattr__ | ( | self, | |
attr, | |||
value | |||
) |
Provides additional checks on recipient fields.
def google.appengine.api.mail.EmailMessage.check_initialized | ( | self | ) |
Provide additional checks to ensure recipients have been specified. Raises: MissingRecipientError when no recipients specified in to, cc or bcc.
def google.appengine.api.mail.EmailMessage.ToProto | ( | self | ) |
Does addition conversion of recipient fields to protocol buffer. Returns: MailMessage protocol version of mail message including sender fields.
def google.appengine.api.mail.EmailMessage.update_from_mime_message | ( | self, | |
mime_message | |||
) |
Copy information from a mime message. Update fields for recipients. Args: mime_message: email.Message instance to copy information from.