| Line 394... |
Line 394... |
| 394 |
java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("yyyy-MM-dd-HH:mm:ss");
|
394 |
java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("yyyy-MM-dd-HH:mm:ss");
|
| 395 |
Calendar cal=GregorianCalendar.getInstance();
|
395 |
Calendar cal=GregorianCalendar.getInstance();
|
| 396 |
String emailFromAddress = "build@shop2020.in";
|
396 |
String emailFromAddress = "build@shop2020.in";
|
| 397 |
String password = "cafe@nes";
|
397 |
String password = "cafe@nes";
|
| 398 |
GmailUtils mailer = new GmailUtils();
|
398 |
GmailUtils mailer = new GmailUtils();
|
| - |
|
399 |
String sendTo[] = new String[]{"vikram.raghav@shop2020.in"};
|
| - |
|
400 |
//String sendTo[] = new String[]{ "sandeep.sachdeva@shop2020.in", "vikram.raghav@shop2020.in", "rajneesh.arora@shop2020.in","khushal.bhatia@shop2020.in","rajveer.singh@saholic.com","manoj.kumar@saholic.com","chaitnaya.vats@saholic.com"};
|
| - |
|
401 |
|
| 399 |
try {
|
402 |
try {
|
| 400 |
if(new_orders==processed_orders && new_orders > 0){
|
403 |
if(new_orders==processed_orders && new_orders > 0){
|
| 401 |
String emailSubjectTxt = "Snapdeal Orders Created Successfully "+sdf.format(cal.getTime());
|
404 |
String emailSubjectTxt = "Snapdeal Orders Created Successfully "+sdf.format(cal.getTime());
|
| 402 |
String text = "Total Orders Received : " + ( new_orders + duplicate_orders ) + "\n" +
|
405 |
String text = "Total Orders Received : " + ( new_orders + duplicate_orders ) + "\n" +
|
| 403 |
"Orders Already Existing : " + duplicate_orders + "\n" +
|
406 |
"Orders Already Existing : " + duplicate_orders + "\n" +
|
| 404 |
"Processed Orders : " + processed_orders + "\n" +
|
407 |
"Processed Orders : " + processed_orders + "\n" +
|
| 405 |
"Failed Orders : " + (new_orders - processed_orders);
|
408 |
"Failed Orders : " + (new_orders - processed_orders);
|
| 406 |
String sendTo[] = new String[]{"vikram.raghav@shop2020.in"};
|
- |
|
| 407 |
//String sendTo[] = new String[]{ "sandeep.sachdeva@shop2020.in", "vikram.raghav@shop2020.in", "rajneesh.arora@shop2020.in","khushal.bhatia@shop2020.in","rajveer.singh@saholic.com","manoj.kumar@saholic.com","chaitnaya.vats@saholic.com"};
|
- |
|
| 408 |
mailer.sendSSLMessage(sendTo, emailSubjectTxt, text, emailFromAddress, password, new ArrayList<File>());
|
409 |
mailer.sendSSLMessage(sendTo, emailSubjectTxt, text, emailFromAddress, password, new ArrayList<File>());
|
| 409 |
}
|
410 |
}
|
| 410 |
else if(new_orders > 0){
|
411 |
else if(new_orders > 0){
|
| 411 |
String emailSubjectTxt = "Snapdeal Orders Failed while creation "+sdf.format(cal.getTime());
|
412 |
String emailSubjectTxt = "Snapdeal Orders Failed while creation "+sdf.format(cal.getTime());
|
| 412 |
String text = "Total Orders Received : " + ( new_orders + duplicate_orders ) + "\n" +
|
413 |
String text = "Total Orders Received : " + ( new_orders + duplicate_orders ) + "\n" +
|
| 413 |
"Orders Already Existing : " + duplicate_orders + "\n" +
|
414 |
"Orders Already Existing : " + duplicate_orders + "\n" +
|
| 414 |
"Processed Orders : " + processed_orders + "\n" +
|
415 |
"Processed Orders : " + processed_orders + "\n" +
|
| 415 |
"Failed Orders : " + (new_orders - processed_orders) + "\n"+ "\n" +
|
416 |
"Failed Orders : " + (new_orders - processed_orders) + "\n"+ "\n" +
|
| 416 |
sb.toString();
|
417 |
sb.toString();
|
| 417 |
String sendTo[] = new String[]{"vikram.raghav@shop2020.in"};
|
- |
|
| 418 |
//String sendTo[] = new String[]{ "sandeep.sachdeva@shop2020.in", "vikram.raghav@shop2020.in", "rajneesh.arora@shop2020.in","khushal.bhatia@shop2020.in","rajveer.singh@saholic.com","manoj.kumar@saholic.com","chaitnaya.vats@saholic.com"};
|
- |
|
| 419 |
mailer.sendSSLMessage(sendTo, emailSubjectTxt, text, emailFromAddress, password, new ArrayList<File>());
|
418 |
mailer.sendSSLMessage(sendTo, emailSubjectTxt, text, emailFromAddress, password, new ArrayList<File>());
|
| 420 |
}
|
419 |
}
|
| 421 |
else{
|
420 |
else{
|
| - |
|
421 |
//sendTo = new String[]{"engg@shop2020.in","sandeep.sachdeva@shop2020.in", "vikram.raghav@shop2020.in", "rajneesh.arora@shop2020.in","khushal.bhatia@shop2020.in","rajveer.singh@saholic.com","manoj.kumar@saholic.com","chaitnaya.vats@saholic.com"};
|
| 422 |
String emailSubjectTxt = "No new Snapdeal Orders " + sdf.format(cal.getTime());
|
422 |
String emailSubjectTxt = "No new Snapdeal Orders " + sdf.format(cal.getTime());
|
| 423 |
String text = "Total Orders Received : " + ( new_orders + duplicate_orders ) + "\n" +
|
423 |
String text = "Total Orders Received : " + ( new_orders + duplicate_orders ) + "\n" +
|
| 424 |
"Orders Already Existing : " + duplicate_orders + "\n" +
|
424 |
"Orders Already Existing : " + duplicate_orders + "\n" +
|
| 425 |
"Processed Orders : " + processed_orders + "\n" +
|
425 |
"Processed Orders : " + processed_orders + "\n" +
|
| 426 |
"Failed Orders : " + (new_orders - processed_orders) + "\n"+ "\n" +
|
426 |
"Failed Orders : " + (new_orders - processed_orders) + "\n"+ "\n" +
|
| 427 |
sb.toString();
|
427 |
sb.toString();
|
| 428 |
String sendTo[] = new String[]{"vikram.raghav@shop2020.in"};
|
- |
|
| 429 |
//String sendTo[] = new String[]{ "sandeep.sachdeva@shop2020.in", "vikram.raghav@shop2020.in", "rajneesh.arora@shop2020.in","khushal.bhatia@shop2020.in","rajveer.singh@saholic.com","manoj.kumar@saholic.com","chaitnaya.vats@saholic.com"};
|
- |
|
| 430 |
mailer.sendSSLMessage(sendTo, emailSubjectTxt, text, emailFromAddress, password, new ArrayList<File>());
|
428 |
mailer.sendSSLMessage(sendTo, emailSubjectTxt, text, emailFromAddress, password, new ArrayList<File>());
|
| 431 |
}
|
429 |
}
|
| 432 |
}
|
430 |
}
|
| 433 |
catch (Exception e) {
|
431 |
catch (Exception e) {
|
| 434 |
e.printStackTrace();
|
432 |
e.printStackTrace();
|