Subversion Repositories SmartDukaan

Rev

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

Rev 15518 Rev 15547
Line 1220... Line 1220...
1220
    generateAgentWiseFreshCallingReport()
1220
    generateAgentWiseFreshCallingReport()
1221
    generateFollowUpCallingReport()
1221
    generateFollowUpCallingReport()
1222
    generateAgentWiseFollowupCallingReport()
1222
    generateAgentWiseFollowupCallingReport()
1223
    generateOnBoardingCallingReport()
1223
    generateOnBoardingCallingReport()
1224
    generateAgentWiseOnboardingCallingReport()
1224
    generateAgentWiseOnboardingCallingReport()
1225
    sendmail(["manas.kapoor@shop2020.in","amit.sirohi@shop2020.in","rajneesh.arora@saholic.com","ritesh.chauhan@shop2020.in", "shailesh.kumar@shop2020.in"], "", TMP_FILE, SUBJECT)
1225
    #sendmail(["amit.sirohi@shop2020.in","rajneesh.arora@saholic.com","ritesh.chauhan@shop2020.in", "shailesh.kumar@shop2020.in","utkarsh@coreoutsourcingservices.com","gupta.varun@coreoutsourcingservices.com"], "", TMP_FILE, SUBJECT)
1226
    #sendmail(["manas.kapoor@shop2020.in"], "", TMP_FILE, SUBJECT)
1226
    sendmail(["manas.kapoor@shop2020.in"], "", TMP_FILE, SUBJECT)
-
 
1227
    
-
 
1228
 
1227
         
1229
         
1228
def sendmail(email, message, fileName, title):
1230
def sendmail(email, message, fileName, title):
1229
    if email == "":
1231
    if email == "":
1230
        return
1232
        return
1231
    mailServer = smtplib.SMTP(SMTP_SERVER, SMTP_PORT)
1233
    mailServer = smtplib.SMTP(SMTP_SERVER, SMTP_PORT)
Line 1247... Line 1249...
1247
    fileMsg.set_payload(file(TMP_FILE).read())
1249
    fileMsg.set_payload(file(TMP_FILE).read())
1248
    encoders.encode_base64(fileMsg)
1250
    encoders.encode_base64(fileMsg)
1249
    fileMsg.add_header('Content-Disposition', 'attachment;filename=' + fileName)
1251
    fileMsg.add_header('Content-Disposition', 'attachment;filename=' + fileName)
1250
    msg.attach(fileMsg)
1252
    msg.attach(fileMsg)
1251
    
1253
    
1252
    MAILTO = ['manas.kapoor@saholic.com','amit.sirohi@shop2020.in','rajneesh.arora@saholic.com', 'ritesh.chauhan@shop2020.in', 'shailesh.kumar@shop2020.in']
1254
    #MAILTO = ['amit.sirohi@shop2020.in','rajneesh.arora@saholic.com', 'ritesh.chauhan@shop2020.in', 'shailesh.kumar@shop2020.in','gupta.varun@coreoutsourcingservices.com','utkarsh@coreoutsourcingservices.com']
1253
    #MAILTO = ['manas.kapoor@saholic.com']
1255
    MAILTO = ['manas.kapoor@saholic.com']
1254
    mailServer.login(SENDER, PASSWORD)
1256
    mailServer.login(SENDER, PASSWORD)
1255
    mailServer.sendmail(PASSWORD, MAILTO, msg.as_string())
1257
    mailServer.sendmail(PASSWORD, MAILTO, msg.as_string())
1256
 
1258
 
1257
if __name__ == '__main__':
1259
if __name__ == '__main__':
1258
    main()
1260
    main()