Python

How to send email using python

How to send email using python

In this tutorial we are going to see how to send an email using python. Here I have used gmail credentials to send an email. First import smtplib in your file to send email using smtp.
Next import MIMEMultipart and MIMEText which is used to format your mail with from, to, subject and body.

Test you code in terminal



Hope, this will help someone else.
Thanks.