Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Google App Engine

You're reading from   Mastering Google App Engine Build robust and highly scalable web applications with Google App Engine

Arrow left icon
Product type Paperback
Published in Oct 2015
Publisher
ISBN-13 9781784396671
Length 368 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

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 of e-mail addresses as well.

  • cc: This is the address of the recipient who gets a copy of the e-mail. It can be a string or a list of strings for multiple e-mail addresses. It is an abbreviation for carbon copy.

  • bcc: This is the address of those...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime