| Line 69... |
Line 69... |
| 69 |
static String password;
|
69 |
static String password;
|
| 70 |
static GmailUtils mailer;
|
70 |
static GmailUtils mailer;
|
| 71 |
static String sendTo[];
|
71 |
static String sendTo[];
|
| 72 |
private static List<SnapdealItemDetails> snapdealItems = new ArrayList<SnapdealItemDetails>();
|
72 |
private static List<SnapdealItemDetails> snapdealItems = new ArrayList<SnapdealItemDetails>();
|
| 73 |
private static Map<Long,SnapdealItemDetails> snapdealItemsMap = new HashMap<Long,SnapdealItemDetails>();
|
73 |
private static Map<Long,SnapdealItemDetails> snapdealItemsMap = new HashMap<Long,SnapdealItemDetails>();
|
| 74 |
private static String alternateEmailFromAddress;
|
- |
|
| 75 |
private static String alternateEmailPassword;
|
- |
|
| 76 |
static
|
74 |
static
|
| 77 |
{
|
75 |
{
|
| 78 |
sdf = new java.text.SimpleDateFormat("yyyy-MM-dd-HH:mm:ss");
|
76 |
sdf = new java.text.SimpleDateFormat("yyyy-MM-dd-HH:mm:ss");
|
| 79 |
emailFromAddress = "build@shop2020.in";
|
77 |
emailFromAddress = "build@shop2020.in";
|
| 80 |
password = "cafe@nes";
|
78 |
password = "cafe@nes";
|
| 81 |
alternateEmailFromAddress = "build-staging@shop2020.in";
|
- |
|
| 82 |
alternateEmailPassword = "shop2020";
|
- |
|
| 83 |
|
- |
|
| 84 |
mailer = new GmailUtils();
|
79 |
mailer = new GmailUtils();
|
| 85 |
//sendTo = new String[]{"vikram.raghav@shop2020.in"};
|
80 |
//sendTo = new String[]{"vikram.raghav@shop2020.in"};
|
| 86 |
sendTo = new String[]{ "sandeep.sachdeva@shop2020.in", "vikram.raghav@shop2020.in", "rajneesh.arora@shop2020.in",
|
81 |
sendTo = new String[]{ "sandeep.sachdeva@shop2020.in", "vikram.raghav@shop2020.in", "rajneesh.arora@shop2020.in",
|
| 87 |
"khushal.bhatia@shop2020.in","manoj.kumar@saholic.com","chaitnaya.vats@saholic.com",
|
82 |
"khushal.bhatia@shop2020.in","manoj.kumar@saholic.com","chaitnaya.vats@saholic.com",
|
| 88 |
"yukti.jain@shop2020.in","manoj.pal@shop2020.in","chandan.kumar@shop2020.in","ankush.dhingra@shop2020.in","amar.kumar@shop2020.in"};
|
83 |
"yukti.jain@shop2020.in","manoj.pal@shop2020.in","chandan.kumar@shop2020.in","ankush.dhingra@shop2020.in","amar.kumar@shop2020.in"};
|
| Line 410... |
Line 405... |
| 410 |
System.out.println("Before sending email");
|
405 |
System.out.println("Before sending email");
|
| 411 |
if(feedResponse.toString().length()>0){
|
406 |
if(feedResponse.toString().length()>0){
|
| 412 |
try {
|
407 |
try {
|
| 413 |
mailer.sendSSLMessage(sendTo, "Flipkart Inventory could not be updated " + sdf.format(System.currentTimeMillis()), feedResponse.toString(), emailFromAddress, password,new ArrayList<File>());
|
408 |
mailer.sendSSLMessage(sendTo, "Flipkart Inventory could not be updated " + sdf.format(System.currentTimeMillis()), feedResponse.toString(), emailFromAddress, password,new ArrayList<File>());
|
| 414 |
} catch (Exception e) {
|
409 |
} catch (Exception e) {
|
| 415 |
emailFromAddress = alternateEmailFromAddress;
|
410 |
emailFromAddress = "build-staging@shop2020.in";
|
| 416 |
password = alternateEmailPassword;
|
411 |
password = "shop2020";
|
| 417 |
try {
|
412 |
try {
|
| 418 |
mailer.sendSSLMessage(sendTo, "Flipkart Inventory could not be updated " + sdf.format(System.currentTimeMillis()), feedResponse.toString(), emailFromAddress, password,new ArrayList<File>());
|
413 |
mailer.sendSSLMessage(sendTo, "Flipkart Inventory could not be updated " + sdf.format(System.currentTimeMillis()), feedResponse.toString(), emailFromAddress, password,new ArrayList<File>());
|
| 419 |
} catch (MessagingException e1) {
|
414 |
} catch (MessagingException e1) {
|
| 420 |
e1.printStackTrace();
|
415 |
e1.printStackTrace();
|
| 421 |
}
|
416 |
}
|
| Line 424... |
Line 419... |
| 424 |
}
|
419 |
}
|
| 425 |
else{
|
420 |
else{
|
| 426 |
try {
|
421 |
try {
|
| 427 |
mailer.sendSSLMessage(sendTo, "Flipkart Inventory updated successfully " + sdf.format(System.currentTimeMillis()), feedResponse.toString(), emailFromAddress, password,new ArrayList<File>());
|
422 |
mailer.sendSSLMessage(sendTo, "Flipkart Inventory updated successfully " + sdf.format(System.currentTimeMillis()), feedResponse.toString(), emailFromAddress, password,new ArrayList<File>());
|
| 428 |
} catch (MessagingException e) {
|
423 |
} catch (MessagingException e) {
|
| 429 |
emailFromAddress = alternateEmailFromAddress;
|
424 |
emailFromAddress = "build-staging@shop2020.in";
|
| 430 |
password = alternateEmailPassword;
|
425 |
password = "shop2020";
|
| 431 |
try {
|
426 |
try {
|
| 432 |
mailer.sendSSLMessage(sendTo, "Flipkart Inventory updated successfully " + sdf.format(System.currentTimeMillis()), feedResponse.toString(), emailFromAddress, password,new ArrayList<File>());
|
427 |
mailer.sendSSLMessage(sendTo, "Flipkart Inventory updated successfully " + sdf.format(System.currentTimeMillis()), feedResponse.toString(), emailFromAddress, password,new ArrayList<File>());
|
| 433 |
} catch (MessagingException e1) {
|
428 |
} catch (MessagingException e1) {
|
| 434 |
e1.printStackTrace();
|
429 |
e1.printStackTrace();
|
| 435 |
}
|
430 |
}
|