March 2019
Beginner
490 pages
12h 40m
English
It is possible to take advantage of the free Gmail SMTP server to send emails. It can be the definitive solution for those who cannot use the SMTP server that's provided by their ISP or their host, as well as those who experience several problems with sending emails. In this section, you will learn how to use the free Gmail SMTP server.
To establish a connection with smtp.gmail.com, we can use the following instructions:
mailServer = smtplib.SMTP('smtp.gmail.com',587)mailServer.ehlo()mailServer.starttls()mailServer.ehlo()mailServer.login("user@gmail.com","password")
Basically, we indicate smtp.gmail.com as the mail server name and the connection as port 587. Then, we establish the starttls() ...
Read now
Unlock full access