January 2019
Beginner
318 pages
8h 23m
English
In this section, we're going to learn about the email message format. Email messages consist of three primary components:
There are other components also included in the message format, such as the subject line, email signatures, and attachments.
Now, we're going to see a simple example of sending a plain text email from your Gmail address, in which you'll learn about writing an email message and sending it. Now, create a script, write_email_message.py, and write the following content in it:
import smtplibimport getpasshost_name = "smtp.gmail.com"port = 465sender = 'sender_emil_id'receiver = 'receiver_email_id'password = getpass.getpass()msg = """\ ...
Read now
Unlock full access