O'Reilly logo

Mastering Google App Engine by Mohsin Shafique Hijazee

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Sending e-mails

Sending e-mails in Google App Engine is pretty simple. We have two options if we want to send e-mails:

  • Use the send_mail() function from google.appengine.api.mail
  • Use EmailMessage from the same module

While sending an e-mail you need some information, such as the recipient of the e-mail, the subject of the e-mail, the contents of the message, and so on. All of this can be supplied via keyword arguments.

The following keyword arguments can be supplied while calling the send_mail() function and are equally applicable for the EmailMessage class's constructor:

  • sender: This is the From field. There are some restrictions on it. We'll take a look at this later.
  • to: This is the address of the recipient of the e-mail. This can be a Python list ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required