| Line 70... |
Line 70... |
| 70 |
column = 0
|
70 |
column = 0
|
| 71 |
for data in r :
|
71 |
for data in r :
|
| 72 |
worksheet.write(row, column, int(data) if type(data) is float else data, datetime_format if type(data) is datetime.datetime else default_format)
|
72 |
worksheet.write(row, column, int(data) if type(data) is float else data, datetime_format if type(data) is datetime.datetime else default_format)
|
| 73 |
column += 1
|
73 |
column += 1
|
| 74 |
workbook.save(TMP_FILE)
|
74 |
workbook.save(TMP_FILE)
|
| 75 |
sendmail(['rajender.singh@shop2020.in','rajneesh.arora@saholic.com','shailesh.kumar@shop2020.in,amit.sirohi@shop2020.in,ritesh.chauhan@shop2020.in'], "", TMP_FILE, SUBJECT)
|
75 |
sendmail(['rajender.singh@shop2020.in','rajneesh.arora@saholic.com', 'khushal.bhatia@saholic.com', 'shailesh.kumar@shop2020.in,amit.sirohi@shop2020.in,ritesh.chauhan@shop2020.in'], "", TMP_FILE, SUBJECT)
|
| 76 |
|
76 |
|
| 77 |
|
77 |
|
| 78 |
|
78 |
|
| 79 |
def sendmail(email, message, fileName, title):
|
79 |
def sendmail(email, message, fileName, title):
|
| 80 |
if email == "":
|
80 |
if email == "":
|
| Line 94... |
Line 94... |
| 94 |
fileMsg = MIMEBase('application', 'vnd.ms-excel')
|
94 |
fileMsg = MIMEBase('application', 'vnd.ms-excel')
|
| 95 |
fileMsg.set_payload(file(TMP_FILE).read())
|
95 |
fileMsg.set_payload(file(TMP_FILE).read())
|
| 96 |
encoders.encode_base64(fileMsg)
|
96 |
encoders.encode_base64(fileMsg)
|
| 97 |
fileMsg.add_header('Content-Disposition', 'attachment;filename=' + fileName)
|
97 |
fileMsg.add_header('Content-Disposition', 'attachment;filename=' + fileName)
|
| 98 |
msg.attach(fileMsg)
|
98 |
msg.attach(fileMsg)
|
| 99 |
MAILTO=['rajender.singh@shop2020.in','rajneesh.arora@saholic.com','shailesh.kumar@shop2020.in,amit.sirohi@shop2020.in,ritesh.chauhan@shop2020.in']
|
99 |
MAILTO=['rajender.singh@shop2020.in','rajneesh.arora@saholic.com', 'khushal.bhatia@saholic.com', 'shailesh.kumar@shop2020.in,amit.sirohi@shop2020.in,ritesh.chauhan@shop2020.in']
|
| 100 |
mailServer.login(SENDER, PASSWORD)
|
100 |
mailServer.login(SENDER, PASSWORD)
|
| 101 |
mailServer.sendmail(PASSWORD, MAILTO, msg.as_string())
|
101 |
mailServer.sendmail(PASSWORD, MAILTO, msg.as_string())
|
| 102 |
|
102 |
|
| 103 |
def main():
|
103 |
def main():
|
| 104 |
generateInviteReport()
|
104 |
generateInviteReport()
|