I am using JCOB with java to open Outlook and create HTML-content email, which is working fine.
I want to track the emails and emails having same subject and cc should be created as thread i.e. reply to the previous email.
public void createEmail(String subject, String recipientTo, String recipientCC, String recipientBCC, String body, EmployeeDto authenticatedUser, DesignationDto userDesignation) {
// Append the signature to the email body
String fullEmailContent = getFullEmailBodyContent(body,authenticatedUser,userDesignation);
Dispatch mail = Dispatch.call(oOutlook, "CreateItem", email).toDispatch();
Dispatch.put(mail, "Subject", subject);
Dispatch.put(mail, "To", recipientTo);
Dispatch.put(mail, "CC", recipientCC);
Dispatch.put(mail, "BCC", recipientBCC);
System.out.println("OUTLOOK OPENING ........\n");
// Set the full body with the signature
Dispatch.put(mail, "HTMLBody", fullEmailContent);
// Save on D drive
Dispatch.call(mail, "SaveAs","D:\\JacobEmail.msg");
// Display in outlook
Dispatch.call(mail, "Display");
}
I am using JCOB with java to open Outlook and create HTML-content email, which is working fine.
I want to track the emails and emails having same subject and cc should be created as thread i.e. reply to the previous email.
here is my code