From 10c2011645daeecddbf5b6049585df9b35e4162e Mon Sep 17 00:00:00 2001 From: shellkore Date: Thu, 10 Jan 2019 01:06:11 +0530 Subject: [PATCH] added mailing service --- python/reissue_book/Library_college.py | 11 +++++++++-- .../__pycache__/mailer.cpython-36.pyc | Bin 0 -> 606 bytes python/reissue_book/mailer.py | 17 +++++++++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 python/reissue_book/__pycache__/mailer.cpython-36.pyc create mode 100644 python/reissue_book/mailer.py diff --git a/python/reissue_book/Library_college.py b/python/reissue_book/Library_college.py index a53643e..80d0ba5 100644 --- a/python/reissue_book/Library_college.py +++ b/python/reissue_book/Library_college.py @@ -6,13 +6,18 @@ import json import os import sys +from mailer import send - +#reading and saving user's information for authentication def user_auth(): username=input('Enter username(reg. no.):-') password=getpass.getpass('Enter password:-') + email=input('Enter your email address:-') + emailpass=getpass.getpass('Enter email password:-') data={'username':username, - 'password':password} + 'password':password, + 'email':email, + 'emailpass':emailpass} with open('data.json','w') as outfile: json.dump(data,outfile) @@ -105,6 +110,8 @@ def user_auth(): else: print('RETURN NEEDED !!!') print('You need to return ""'+book[i].text+'"" today. ') + #function to send self-reminder in user's email + send() #closing browser/webdriver browser.close() diff --git a/python/reissue_book/__pycache__/mailer.cpython-36.pyc b/python/reissue_book/__pycache__/mailer.cpython-36.pyc new file mode 100644 index 0000000000000000000000000000000000000000..12456e84fdbf2f33dd14071ec2e3a1e32ff7edce GIT binary patch literal 606 zcmYjPO^?$s5FIkailgM`EhArO1p4*^{SL`YS(c3XGtIM~jiRdWh= zeg}WaS5Eu|PK*PBwKUJxyr(yBqC6dq4xgMq`@A6lKj6-x_yq&2?qr&>|sMV+-P4Y=$p>_P3-90~ zpz2_s@bnZA4^E+@1o)t3*dP4sN0xO7iRvtRa=<*<)lVD^yJM$)JzeQis_DXLd5$aW zhP?FUbmL4FQW2>z?610XZue*=)N*WvmKB%PYP>XdtmKU??RI=)%q>#VxkgNeVGzxc zE7Nlqq?UDzlOmN<_u`iR?=w{Uo&vQx+^5g<;gsmr{wq zV!|-c!ntxKzJrY){8yc?jTX6E3#D$275SN2G+I>N<+JPeXP@#ocJ54L7pM|SRI<_Y zvhhZjUYaVu__N33SN~h})~}KIyVN{xn8$#^PU~%8F)#iF;2t0V$>