Skip to content

Instantly share code, notes, and snippets.

@yongghongg
Last active June 19, 2021 16:11
Show Gist options
  • Save yongghongg/8e5b1324b7984bfedfad5de4fa74ae0b to your computer and use it in GitHub Desktop.
Save yongghongg/8e5b1324b7984bfedfad5de4fa74ae0b to your computer and use it in GitHub Desktop.
import email
# you can add this part of code at the end of part 2
# remember: screened_list contains the result of the screening
# configure email and message
msg = email.message_from_string(", ".join(screened_list))
msg['From'] = 'YOUR_EMAIL@gmail.com'
msg['To'] = 'YOUR_EMAIL@gmail.com'
msg['Subject'] = "EMA Bounce Result for Today!"
s = smtplib.SMTP("smtp.gmail.com",587)
## for yahoo mail user: s = smtplib.SMTP("smtp.mail.yahoo.com",587)
## for hotmail user: s = smtplib.SMTP("smtp.live.com",587)
s.ehlo()
s.starttls()
s.ehlo()
s.login(email_from,"YOUR_PASSWORD")
s.sendmail(email_from, [email_to] + [email_cc], msg.as_string())
s.quit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment