I just want to send an email in python with an attachment
import smtplib, os from email.MIMEMultipart import MIMEMultipart from email.MIMEBase import MIMEBase fr
On gmail you also have to give a smtp.ehlo() before smtp.starttls() This is also duplicate of How to send an email with Gmail as provider using Python?
smtp.ehlo()
smtp.starttls()