We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Email going blank

Dear Team,


We are using Aspose Email for one the requirment , Where we are having some .msg template
which are loading using MailMesaage and trying to attach some document as add attachment is avaiable in Mail Message class.
and saving the same . The issue is when we open the msg file which is created as part of conversion . we are not getting issue that while sending mail the content which user pass in the mail is not passing … The mail is going blank without added body content by user


try {
String parsedAttch = request.getParameter(“attachments”);
String[] parsedAttachArray = parsedAttch.split(",");

loadAsposeLicense();
Attachment att;
session = getDfSession();
IDfDocument msgTemplate = (IDfDocument) session.getObject(new DfId(template));
MailMessage msg = MailMessage.load(msgTemplate.getContent());
MapiMessage mapiMsg = MapiMessage.fromStream(msgTemplate.getContent());

for (String attachIds : parsedAttachArray) {
IDfDocument attachId = (IDfDocument) session.getObject(new DfId(attachIds));
att = new Attachment(attachId.getContent(), attachId.getContentType());

String name = attachId.getObjectName();
String extension = attachId.getFormat().getDOSExtension().toLowerCase();

if (!name.toLowerCase(Locale.ENGLISH).endsWith("." + extension)) {
name = name + “.” + extension;
}
att.setName(name);
msg.addAttachment(att);

}

MailAddressCollection mailAddColl = new MailAddressCollection();
MailAddress mailAdd = new MailAddress(“EDM.Administrator@ing.be”);
msg.setTo(mailAddColl);
msg.setCC(mailAddColl);
msg.setFrom(mailAdd);
msg.setSubject(mapiMsg.getSubject());
msg.setSubjectEncoding(StandardCharsets.UTF_8);

response.setStatus(200);
response.setHeader(“Content-Disposition”, “attachment; filename=”" + msgTemplate.getObjectName()
+ “.msg”");
response.setContentType(“application/vnd.ms-outlook”);
msg.save(response.getOutputStream(), MailMessageSaveType.getOutlookMessageFormatUnicode());
logger.info("createMailFromTemplate " + template);

Hi,


Thank you for writing to Aspose support team.

This issue is reproduce and logged under Id: EMAILJAVA-34238 for further investigation by the product team.You will be automatically notified once any update is received in this regard.

Hi Kashif,


Thanks for the reply , We found one more issue that is when we try to read the getReplyto from one msg file we are getting null value where as the replyto value is there,
Can you please suggest? Its quite urgent for us as we are moving in prodcution soon.


MailAddressCollection mailAddReply = mailMsg.getReplyToList();

This is not bringing any value


Neeraj
+32466255134

Hi Neeraj,


This issue is reproduced and logged under Id: EMAILJAVA-34240 for further investigation by the product team. You will be automatically notified once any update is received in this regard.

Hi Kashif,


Is there any update on the two issue . Just want to add that we are using aspose 4.8.0.
We also tried with 17.1.x and notice that the issue for removal of content when we convert the msg using MailMessage is resolved in it. But since we have lic for 4.8.0 , how can we move further,
Its really urgent for us , Please suggest ?

Hi Kashif,


We noticed that when using MailMessage class the .msg file which is already attached in not working properly. Like it remove the option Direcr replies to which make issue with ReplyTo.

Where as with MapiMessage this is working fine. But We cannot use MapiMessage beacsue it doesnot have option to add attachment.
Where as in mailMessage it do. When we try to convert Mailmessage to MapiMessage the same issue comes in Mapimessage too

Neeraj Singh
Hi Neeraj,

bhainsora82:

We also tried with 17.1.x and notice that the issue for removal of content when we convert the msg using MailMessage is resolved in it.

If the issue persists with an older version and not with the latest version of the API, we can't help in that case. At our end, we were able to reproduce the problem with the latest version of the API and that is why it has been logged. If you have tried some other template message that works well with the latest version of the API, please share the details with us for our consideration. In any case, you will have to update to the latest version of the API where this issue is fixed.

The issues you have found earlier (filed as EMAILJAVA-34240) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.