Skip to content

Commit 9b78bac

Browse files
committed
Fixed minor error
1 parent dd40a54 commit 9b78bac

3 files changed

Lines changed: 11 additions & 7 deletions

File tree

__pycache__/lists.cpython-38.pyc

0 Bytes
Binary file not shown.

lists.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
names = []
2+
emails = []

main.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
l = "smtp.gmail.com"
2828
s = smtplib.SMTP(l, 587)
2929
listLen = 0
30-
loginWorked = 0
30+
login = 0
3131

3232
class 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 \nTry 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\nAdd An Email from you sending list(A)\nRemove 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()

0 commit comments

Comments
 (0)