File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ names = []
2+ emails = []
Original file line number Diff line number Diff line change 2727l = "smtp.gmail.com"
2828s = smtplib .SMTP (l , 587 )
2929listLen = 0
30- loginWorked = 0
30+ login = 0
3131
3232class email :
3333 def save ():
@@ -54,13 +54,14 @@ def loginSMTP():
5454 print ("Debug Info: TLS Worked" )
5555 except :
5656 print ("Debug Info: TLS Failed" )
57+ login = 0
5758 try :
5859 s .login (str (theirUsername ), str (password ))
5960 print ("Debug Info: Succesful you are now logged in and can send emails\n \n " )
60- loginWorked = 1
61+ login = 1
6162 except :
6263 print ("Debug Info: Login Failed \n Try changing you allow less secure app access in your gmail account settings, Or reenter your credentials\n \n " )
63- loginWorked = 0
64+ login = 0
6465 def addEmail ():
6566 nameInput = str (input ("What is the Name you would like to append\n " ))
6667 names .append (nameInput )
@@ -111,12 +112,13 @@ def sendEmail():
111112 msg = ""
112113 def choose ():
113114 inputString = ("What do you want to do:\n \n Add An Email from you sending list(A)\n Remove an email from you sending list(R)\n " )
114- if loginWorked == 1 :
115- inputString = inputString + "Send an Email(S)\n "
115+ if ( login == 1 ) :
116+ inputString = inputString + "Send an Email(S)\n "
116117 else :
117- inputString = inputString + "Login(L)\n "
118+ inputString = inputString + "Login(L)\n "
119+
118120 loginWorked = 1
119- choice = input ()
121+ choice = input (inputString )
120122
121123 if choice .lower () == "a" :
122124 email .addEmail ()
You can’t perform that action at this time.
0 commit comments