Example output
import smtplib
from email.mime.text import MIMEText
# email account login information
username = 'myemail@gmail.com'
password = 'password'
# SMTP server settings
smtp_server = 'smtp.gmail.com'
smtp_port = 587
# message body
message_body = 'Hello! We\'re happy to offer you our product at a special price. Take advantage of the limited time offer!'
# list of recipients
recipients = ['address1@email.com', 'address2@email.com']
# create email message
msg = MIMEText(message_body)
msg['From'] = username
msg['To'] = ', '.join(recipients)
msg['Subject'] = 'Special Offer'
# connect to SMTP server and send message
server = smtplib.SMTP(smtp_server, smtp_port)
server.starttls()
server.login(username, password)
server.sendmail(username, recipients, msg.as_string())
server.quit()
print('Message sent successfully!')