| Line 83... |
Line 83... |
| 83 |
column = 0
|
83 |
column = 0
|
| 84 |
for data in r :
|
84 |
for data in r :
|
| 85 |
worksheet.write(row, column, int(data) if type(data) is float else data, datetime_format if type(data) is datetime.datetime else default_format)
|
85 |
worksheet.write(row, column, int(data) if type(data) is float else data, datetime_format if type(data) is datetime.datetime else default_format)
|
| 86 |
column += 1
|
86 |
column += 1
|
| 87 |
workbook.save(TMP_FILE)
|
87 |
workbook.save(TMP_FILE)
|
| 88 |
sendmail(["manas.kapoor@shop2020.in",'amit.sirohi@saholic.com','shailesh.kumar@saholic.com'], "", TMP_FILE, SUBJECT)
|
88 |
sendmail(["rajender.singh@shop2020.in",'amit.sirohi@saholic.com','shailesh.kumar@saholic.com'], "", TMP_FILE, SUBJECT)
|
| 89 |
except:
|
89 |
except:
|
| 90 |
print "Could not create report"
|
90 |
print "Could not create report"
|
| 91 |
|
91 |
|
| 92 |
|
92 |
|
| 93 |
def sendmail(email, message, fileName, title):
|
93 |
def sendmail(email, message, fileName, title):
|
| Line 115... |
Line 115... |
| 115 |
# fileMsg1.set_payload(file("/root/snapdeal.csv" ).read())
|
115 |
# fileMsg1.set_payload(file("/root/snapdeal.csv" ).read())
|
| 116 |
# encoders.encode_base64(fileMsg1)
|
116 |
# encoders.encode_base64(fileMsg1)
|
| 117 |
# fileMsg1.add_header('Content-Disposition', 'attachment;filename=Affiliate')
|
117 |
# fileMsg1.add_header('Content-Disposition', 'attachment;filename=Affiliate')
|
| 118 |
# msg.attach(fileMsg1)
|
118 |
# msg.attach(fileMsg1)
|
| 119 |
|
119 |
|
| 120 |
MAILTO = ['manas.kapoor@saholic.com','amit.sirohi@saholic.com','shailesh.kumar@saholic.com']
|
120 |
MAILTO = ['rajender.singh@saholic.com','amit.sirohi@saholic.com','shailesh.kumar@saholic.com']
|
| 121 |
mailServer.login(SENDER, PASSWORD)
|
121 |
mailServer.login(SENDER, PASSWORD)
|
| 122 |
mailServer.sendmail(PASSWORD, MAILTO, msg.as_string())
|
122 |
mailServer.sendmail(PASSWORD, MAILTO, msg.as_string())
|
| 123 |
|
123 |
|
| 124 |
def main():
|
124 |
def main():
|
| 125 |
generateActivationReport()
|
125 |
generateActivationReport()
|