In this chapter, we looked at how e-mails work at a very high level. We saw that SMTP is a text-based protocol and the SMTP servers listen on port 587
for the e-mail clients to access them. E-mails, if on the same server, are just copied to the destined user's inbox. If they are on a different server, a DNS lookup is performed to find out the IP of the SMTP server and the e-mail is handed over to that server.
Next, we saw how to send e-mails. We saw that send_email()
is the function that we can use. We also saw that EmailMessage
is a class whose instance can be created and used to send an e-mail. We learned that both the function and the EmailMessage
class's constructor take the same keyword arguments. We also learned how to send attachments with our e-mails.
After that, we learned how to send e-mail headers. We examined the available headers that are allowed in Google App Engine.
Once done with all aspects of sending e-mails, we focused our attention on receiving e-mails. We learned...