Last active
June 19, 2021 16:11
-
-
Save yongghongg/8e5b1324b7984bfedfad5de4fa74ae0b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'] = '[email protected]' | |
msg['To'] = '[email protected]' | |
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