Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)



The EmailMessage Class

An instance of the EmailMessage class represents an email message, and includes a method to send the message using the App Engine Mail service.

EmailMessage is provided by the google.appengine.api.mail module.

  1. Introduction
  2. EmailMessage()
  3. Instance methods:

Introduction

An EmailMessage instance represents an email message to be sent using the App Engine Mail service. An email message has a set of fields, which can be initialized using the constructor, and adjusted using attributes of the instance.

For a list of the fields of an EmailMessage, see Email Message Fields .

When all of the appropriate fields are set, the send() method sends the email message using the current values of the fields. An EmailMessage instance can be reused to send multiple messages with similar field values.

Constructor

class EmailMessage (** kw )

An email message to be sent via the Mail API.

The fields of the message can be initialized using keyword arguments passed to the constructor. For a list of possible fields, see Email Message Fields .

Fields can also be set after construction using attributes of the instance, or by passing keyword arguments to the initialize() method.

Instance Methods

An EmailMessage instance has the following methods:

check_initialized ()

Checks if the EmailMessage is properly initialized for sending. If the message is not properly initialized, the method raises an error that corresponds with the first problem it finds. Returns without raising an error if the message is ready to send.

initialize (** kw )
Sets fields of the email message using keyword arguments. For a list of possible fields, see Email Message Fields .
is_initialized ()
Returns True if the EmailMessage is properly initialized for sending. This performs the same checks as check_initialized() , but does not raise an error.
send ()
Sends the email message.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.