| Line 586... |
Line 586... |
| 586 |
|
586 |
|
| 587 |
ServletOutputStream sos;
|
587 |
ServletOutputStream sos;
|
| 588 |
try {
|
588 |
try {
|
| 589 |
sos = response.getOutputStream();
|
589 |
sos = response.getOutputStream();
|
| 590 |
if(sb.toString().equalsIgnoreCase("")){
|
590 |
if(sb.toString().equalsIgnoreCase("")){
|
| 591 |
sos.write(sb.toString().getBytes());
|
591 |
sos.write("Orders Created Successfully (No Alerts)".toString().getBytes());
|
| 592 |
}
|
592 |
}
|
| 593 |
else{
|
593 |
else{
|
| 594 |
if(orders_processed!=0){
|
594 |
if(orders_processed!=0){
|
| 595 |
sos.write("Orders Created Successfully".toString().getBytes());
|
595 |
sos.write(("Orders Created with Alerts "+ sb.toString()).getBytes());
|
| 596 |
}
|
596 |
}
|
| 597 |
else{
|
597 |
else{
|
| 598 |
sos.write("Zero Approved Orders".toString().getBytes());
|
598 |
sos.write(("Zero Approved Orders"+ sb.toString()).getBytes());
|
| 599 |
}
|
599 |
}
|
| 600 |
}
|
600 |
}
|
| 601 |
sos.flush();
|
601 |
sos.flush();
|
| 602 |
} catch (IOException e) {
|
602 |
} catch (IOException e) {
|
| 603 |
System.out.println("Unable to stream the manifest file");
|
603 |
System.out.println("Unable to stream the manifest file");
|
| Line 619... |
Line 619... |
| 619 |
"yukti.jain@shop2020.in","manisha.sharma@shop2020.in","chandan.kumar@shop2020.in","ankush.dhingra@shop2020.in","amar.kumar@shop2020.in"};
|
619 |
"yukti.jain@shop2020.in","manisha.sharma@shop2020.in","chandan.kumar@shop2020.in","ankush.dhingra@shop2020.in","amar.kumar@shop2020.in"};
|
| 620 |
*/
|
620 |
*/
|
| 621 |
try {
|
621 |
try {
|
| 622 |
logger.info("Before Sending Emails");
|
622 |
logger.info("Before Sending Emails");
|
| 623 |
if(sb.toString().equalsIgnoreCase("")){
|
623 |
if(sb.toString().equalsIgnoreCase("")){
|
| 624 |
String emailSubjectTxt = "Flipkart Orders Created Successfully (Check Alerts)"+sdf.format(cal.getTime());
|
624 |
String emailSubjectTxt = "Flipkart Orders Created Successfully"+sdf.format(cal.getTime());
|
| 625 |
mailer.sendSSLMessage(sendTo, emailSubjectTxt, sb.toString(), emailFromAddress, password, new ArrayList<File>());
|
625 |
mailer.sendSSLMessage(sendTo, emailSubjectTxt,"Orders Created Successfully (No Alerts)", emailFromAddress, password, new ArrayList<File>());
|
| 626 |
logger.info("Sending Emails Flipkart Orders Created Successfully (Check Alerts)");
|
626 |
logger.info("Sending Emails Flipkart Orders Created Successfully (No Alerts)");
|
| 627 |
}
|
627 |
}
|
| 628 |
else{
|
628 |
else{
|
| 629 |
if(orders_processed!=0){
|
629 |
if(orders_processed!=0){
|
| 630 |
String emailSubjectTxt = "Flipkart Orders Created Successfully"+sdf.format(cal.getTime());
|
630 |
String emailSubjectTxt = "Flipkart Orders Created Successfully (Check Alerts)"+sdf.format(cal.getTime());
|
| 631 |
mailer.sendSSLMessage(sendTo, emailSubjectTxt,sb.toString(), emailFromAddress, password, new ArrayList<File>());
|
631 |
mailer.sendSSLMessage(sendTo, emailSubjectTxt,sb.toString(), emailFromAddress, password, new ArrayList<File>());
|
| 632 |
logger.info("Sending Emails Flipkart Orders Created Successfully (Check Alerts)");
|
632 |
logger.info("Sending Emails Flipkart Orders Created Successfully (Check Alerts)");
|
| 633 |
}
|
633 |
}
|
| 634 |
else{
|
634 |
else{
|
| 635 |
String emailSubjectTxt = "No New Approved Orders"+sdf.format(cal.getTime());
|
635 |
String emailSubjectTxt = "No New Approved Orders"+sdf.format(cal.getTime());
|
| 636 |
mailer.sendSSLMessage(sendTo, emailSubjectTxt,sb.toString(), emailFromAddress, password, new ArrayList<File>());
|
636 |
mailer.sendSSLMessage(sendTo, emailSubjectTxt,sb.toString(), emailFromAddress, password, new ArrayList<File>());
|
| - |
|
637 |
logger.info("Sending Emails Flipkart Orders Created Successfully (Check Alerts)");
|
| 637 |
|
638 |
|
| 638 |
}
|
639 |
}
|
| 639 |
}
|
640 |
}
|
| 640 |
|
641 |
|
| 641 |
}
|
642 |
}
|