| Line 568... |
Line 568... |
| 568 |
if (ActivityType.SEND_EMAIL_TO_CUSTOMER.equals(activity.getType())) {
|
568 |
if (ActivityType.SEND_EMAIL_TO_CUSTOMER.equals(activity.getType())) {
|
| 569 |
log.info("Sending mail");
|
569 |
log.info("Sending mail");
|
| 570 |
Client helperClient = new HelperClient().getClient();
|
570 |
Client helperClient = new HelperClient().getClient();
|
| 571 |
activity.setUserEmailId(helperClient.saveUserEmailForSending(
|
571 |
activity.setUserEmailId(helperClient.saveUserEmailForSending(
|
| 572 |
Arrays.asList(customerEmailId), CRMConstants.CRM_EMAIL_SENDOR,
|
572 |
Arrays.asList(customerEmailId), CRMConstants.CRM_EMAIL_SENDOR,
|
| 573 |
subject, body, null, CRMConstants.CRM_EMAIL_TYPE, null, null));
|
573 |
subject, body, null, CRMConstants.CRM_EMAIL_TYPE, null, null, 1));
|
| 574 |
|
574 |
|
| 575 |
String plainTextbody = new Source(body).getTextExtractor().toString();
|
575 |
String plainTextbody = new Source(body).getTextExtractor().toString();
|
| 576 |
|
576 |
|
| 577 |
// We change activityType to OTHER when pop up box for email
|
577 |
// We change activityType to OTHER when pop up box for email
|
| 578 |
// closes
|
578 |
// closes
|
| Line 607... |
Line 607... |
| 607 |
String escalationMailBody = createEscalationMailBody(ticket, escalation);
|
607 |
String escalationMailBody = createEscalationMailBody(ticket, escalation);
|
| 608 |
|
608 |
|
| 609 |
activity.setUserEmailId(helperClient.saveUserEmailForSending(
|
609 |
activity.setUserEmailId(helperClient.saveUserEmailForSending(
|
| 610 |
toMailIds, CRMConstants.CRM_EMAIL_SENDOR,
|
610 |
toMailIds, CRMConstants.CRM_EMAIL_SENDOR,
|
| 611 |
escalationMailSubject, escalationMailBody,
|
611 |
escalationMailSubject, escalationMailBody,
|
| 612 |
null, CRMConstants.CRM_EMAIL_TYPE, null, null));
|
612 |
null, CRMConstants.CRM_EMAIL_TYPE, null, null, 1));
|
| 613 |
|
613 |
|
| 614 |
// We change activityType to OTHER when pop up box for email
|
614 |
// We change activityType to OTHER when pop up box for email
|
| 615 |
// closes
|
615 |
// closes
|
| 616 |
activity.setDescription("To: " + toMailIds + "\n\nSubject: " + escalationMailSubject + "\n\n"
|
616 |
activity.setDescription("To: " + toMailIds + "\n\nSubject: " + escalationMailSubject + "\n\n"
|
| 617 |
+ "Body: " + escalationMailBody);
|
617 |
+ "Body: " + escalationMailBody);
|