From 23496a4decf2289973f3ce1577abc9b050657ccb Mon Sep 17 00:00:00 2001 From: gsiahaan Date: Thu, 1 Sep 2022 17:13:11 +0700 Subject: [PATCH] add comment in code so new user can understand what's going on fix space in em[' subject'] = subject #line 21 that make Subject empty even we have write our subject --- email sender.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/email sender.py b/email sender.py index eb52c76..864011c 100644 --- a/email sender.py +++ b/email sender.py @@ -1,13 +1,24 @@ from email.message import EmailMessage + +"""This app2 module is not standard module, it's a custom module created by the owner. You will not find it if you search in Google +you can delete this module from this code and for the exchange you type your password that you get from Google Account>Security>App passwords in email password""" from app2 import password import ssl import smtplib -email_sender = ' codewithtomi@gmail.com' + +#fill your email in email_sender +email_sender = 'codewithtomi@gmail.com' +"""you can type your password here with double quota/apostrophe that you got from your Google Account>Security>App passwords +if you didn't use module app2""" email_password = password +#fill your target email in email_receiver email_receiver = '' +#your email subject goes here subject = "Dont forget to subscribe" + +#your email message goes here body = """ When you watch a video, please hit subscribe """ @@ -15,7 +26,7 @@ em = EmailMessage() em['From'] = email_sender em['To'] = email_receiver -em[' subject'] = subject +em['subject'] = subject em.set_content(body)