Below is the method I used.
def SendEmail(content):
gmailUser = ‘me’
password = ‘password’
recipients = [‘you1’,
‘you2’,
‘you3’
]
msg = MIMEMultipart(‘alternative’)
msg[‘Subject’] = ‘Subject’
msg[‘From’] = gmailUser
msg[‘To’] = ‘, ‘.join(recipients)
content = MIMEText(html, ‘html’)
msg.attach(content)
mailServer = smtplib.SMTP(‘smtp.gmail.com’, 587)
mailServer.ehlo()
mailServer.starttls()
mailServer.ehlo()
mailServer.login(gmailUser, password)
mailServer.sendmail(sender, recipients, msg.as_string())
mailServer.close()