Hi.
Messages that I am creating are text messages. I would like to create an HTML message instead of text message. What should I do?
My code is:
License license = new License();
license.setLicense(secretPath);
System.setProperty(“file.encoding”, “UTF-8”);
MailMessage message = new MailMessage();
message.setSubject(" “);
message.setHtmlBody(”");
AttachmentCollection attachments = message.getAttachments();
Attachment attObj = new Attachment(fileName);
String fileNameWithoutFolder = new File(fileName).getName();
attObj.setName(fileNameWithoutFolder);
message.addAttachment(attObj);
MapiMessage mapiMsg = MapiMessage.fromMailMessage(message);
mapiMsg.setMessageFlags(MapiMessageFlags.MSGFLAG_UNSENT | MapiMessageFlags.MSGFLAG_FROMME);
mapiMsg.save(outputFileName);
Kind regards,
JP.
<br>