Subversion Repositories SmartDukaan

Rev

Rev 15455 | Rev 15481 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 15455 Rev 15478
Line 1201... Line 1201...
1201
    generateAgentWiseFreshCallingReport()
1201
    generateAgentWiseFreshCallingReport()
1202
    generateFollowUpCallingReport()
1202
    generateFollowUpCallingReport()
1203
    generateAgentWiseFollowupCallingReport()
1203
    generateAgentWiseFollowupCallingReport()
1204
    generateOnBoardingCallingReport()
1204
    generateOnBoardingCallingReport()
1205
    generateAgentWiseOnboardingCallingReport()
1205
    generateAgentWiseOnboardingCallingReport()
1206
    #sendmail(["manas.kapoor@shop2020.in","amit.sirohi@shop2020.in","rajneesh.arora@saholic.com"], "", TMP_FILE, SUBJECT)
1206
    sendmail(["manas.kapoor@shop2020.in","amit.sirohi@shop2020.in","rajneesh.arora@saholic.com","ritesh.chauhan@shop2020.in", "shailesh.kumar@shop2020.in"], "", TMP_FILE, SUBJECT)
1207
    sendmail(["manas.kapoor@shop2020.in"], "", TMP_FILE, SUBJECT)
1207
    #sendmail(["manas.kapoor@shop2020.in"], "", TMP_FILE, SUBJECT)
1208
         
1208
         
1209
def sendmail(email, message, fileName, title):
1209
def sendmail(email, message, fileName, title):
1210
    if email == "":
1210
    if email == "":
1211
        return
1211
        return
1212
    mailServer = smtplib.SMTP(SMTP_SERVER, SMTP_PORT)
1212
    mailServer = smtplib.SMTP(SMTP_SERVER, SMTP_PORT)
Line 1228... Line 1228...
1228
    fileMsg.set_payload(file(TMP_FILE).read())
1228
    fileMsg.set_payload(file(TMP_FILE).read())
1229
    encoders.encode_base64(fileMsg)
1229
    encoders.encode_base64(fileMsg)
1230
    fileMsg.add_header('Content-Disposition', 'attachment;filename=' + fileName)
1230
    fileMsg.add_header('Content-Disposition', 'attachment;filename=' + fileName)
1231
    msg.attach(fileMsg)
1231
    msg.attach(fileMsg)
1232
    
1232
    
1233
    #MAILTO = ['manas.kapoor@saholic.com','amit.sirohi@shop2020.in','rajneesh.arora@saholic.com']
1233
    MAILTO = ['manas.kapoor@saholic.com','amit.sirohi@shop2020.in','rajneesh.arora@saholic.com', 'ritesh.chauhan@shop2020.in', 'shailesh.kumar@shop2020.in']
1234
    MAILTO = ['manas.kapoor@saholic.com']
1234
    #MAILTO = ['manas.kapoor@saholic.com']
1235
    mailServer.login(SENDER, PASSWORD)
1235
    mailServer.login(SENDER, PASSWORD)
1236
    mailServer.sendmail(PASSWORD, MAILTO, msg.as_string())
1236
    mailServer.sendmail(PASSWORD, MAILTO, msg.as_string())
1237
 
1237
 
1238
if __name__ == '__main__':
1238
if __name__ == '__main__':
1239
    main()
1239
    main()