7
7
print (current_path )
8
8
os .chdir (current_path ) # Changing the Path of the directory in which you are currently working
9
9
10
- GMAIL_ID = '</ Enter your email here />' # Give your mail here from which you want to send the wishes
11
- GMAIL_PSWD = '</ Enter password for your email here />' # Give your mail password
10
+ GMAIL_ID = input ( " Enter your email: " ) # Give your mail here from which you want to send the wishes
11
+ GMAIL_PSWD = input ( " Enter password for your email mentioned above: " ) # Give your mail password
12
12
13
13
14
14
def sendEmail (to , sub , msg ):
@@ -22,7 +22,6 @@ def sendEmail(to, sub, msg):
22
22
23
23
if __name__ == "__main__" :
24
24
df = pd .read_excel ("data.xlsx" ) # the datasheet where the data of the friends is stored
25
- print (df )
26
25
today = datetime .datetime .now ().strftime ("%d-%m" )
27
26
yearNow = datetime .datetime .now ().strftime ("%Y" )
28
27
@@ -31,7 +30,6 @@ def sendEmail(to, sub, msg):
31
30
bday = item ['Birthday' ]
32
31
bday = datetime .datetime .strptime (bday , "%d-%m-%Y" )
33
32
bday = bday .strftime ("%d-%m" )
34
- print (bday )
35
33
if (today == bday ) and yearNow not in str (item ['LastWishedYear' ]):
36
34
sendEmail (item ['Email' ], "Happy Birthday" , item ['Dialogue' ]) # calling the sendmail function
37
35
writeInd .append (index )
@@ -41,4 +39,4 @@ def sendEmail(to, sub, msg):
41
39
oldYear = df .loc [i , 'LastWishedYear' ]
42
40
df .loc [i , 'LastWishedYear' ] = str (oldYear ) + ", " + str (yearNow )
43
41
44
- df .to_excel ('data.xlsx' , index = False )
42
+ df .to_excel ('data.xlsx' , index = False )
0 commit comments