| Line 1128... |
Line 1128... |
| 1128 |
|
1128 |
|
| 1129 |
Map<String, Object> emailModel = new HashMap<>();
|
1129 |
Map<String, Object> emailModel = new HashMap<>();
|
| 1130 |
emailModel.put("customer", customerAddress);
|
1130 |
emailModel.put("customer", customerAddress);
|
| 1131 |
emailModel.put("pendingOrder", pendingOrder);
|
1131 |
emailModel.put("pendingOrder", pendingOrder);
|
| 1132 |
emailModel.put("date", dateTimeFormatter);
|
1132 |
emailModel.put("date", dateTimeFormatter);
|
| 1133 |
|
- |
|
| - |
|
1133 |
LOGGER.info("emal" + customer.getEmailId());
|
| 1134 |
String[] customerEmail = null;
|
1134 |
String[] customerEmail = null;
|
| 1135 |
if (customer.getEmailId() != null) {
|
1135 |
if (customer.getEmailId() != null && !customer.getEmailId().isEmpty()) {
|
| 1136 |
customerEmail = new String[] { customer.getEmailId() };
|
1136 |
customerEmail = new String[] { customer.getEmailId() };
|
| 1137 |
|
1137 |
|
| 1138 |
List<String> bccTo = Arrays.asList("tejbeer.kaur@smartdukaan.com");
|
1138 |
List<String> bccTo = Arrays.asList("tejbeer.kaur@smartdukaan.com");
|
| 1139 |
|
1139 |
|
| 1140 |
emailService.sendMailWithAttachments("Order Cancellation", "order-cancellation.vm", emailModel,
|
1140 |
emailService.sendMailWithAttachments("Order Cancellation", "order-cancellation.vm", emailModel,
|
| Line 1193... |
Line 1193... |
| 1193 |
emailModel.put("customer", customerAddress);
|
1193 |
emailModel.put("customer", customerAddress);
|
| 1194 |
emailModel.put("pendingOrder", pendingOrder);
|
1194 |
emailModel.put("pendingOrder", pendingOrder);
|
| 1195 |
emailModel.put("date", dateTimeFormatter);
|
1195 |
emailModel.put("date", dateTimeFormatter);
|
| 1196 |
Customer customer = customerRepository.selectById(pendingOrder.getCustomerId());
|
1196 |
Customer customer = customerRepository.selectById(pendingOrder.getCustomerId());
|
| 1197 |
String[] customerEmail = null;
|
1197 |
String[] customerEmail = null;
|
| 1198 |
if (customer.getEmailId() != null) {
|
1198 |
if (customer.getEmailId() != null && !customer.getEmailId().isEmpty()) {
|
| 1199 |
customerEmail = new String[] { customer.getEmailId() };
|
1199 |
customerEmail = new String[] { customer.getEmailId() };
|
| 1200 |
List<String> bccTo = Arrays.asList("tejbeer.kaur@smartdukaan.com");
|
1200 |
List<String> bccTo = Arrays.asList("tejbeer.kaur@smartdukaan.com");
|
| 1201 |
|
1201 |
|
| 1202 |
emailService.sendMailWithAttachments("Order Delivered with SmartDukaan", "order-delivered.vm", emailModel,
|
1202 |
emailService.sendMailWithAttachments("Order Delivered with SmartDukaan", "order-delivered.vm", emailModel,
|
| 1203 |
customerEmail, null, bccTo.toArray(new String[0]));
|
1203 |
customerEmail, null, bccTo.toArray(new String[0]));
|