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

Free Support Forum - aspose.com

Some Attachment DisplayNames aren't correct after MapiMessage.Save()

We are attempting to save an email which contains an attachment to a MSG file. For the most part it seems to work correctly. However, we’ve noticed that occasionally the title of the attachment isn’t what we were expecting. I have attached a project to this post which demonstrates the problem.


The project loads an email from Xml (our code) into your MapiMessage object. It then prints out the title of the attachment to the console. At this point everything looks as it should and the Display Name of the attachment is as we expect. We then call the MapiMessage’s Save method, which writes the email to a MSG file. When we then proceed to open the MSG file, we see that the Display Name of the attachment is not correct.

The attached image shows an example.

Hi,

Thank you for writing to Aspose support team.

I have thoroughly investigated the issue and observed that this issue is due to file naming convention scheme implemented by Microsoft Windows. MS Windows does not allow saving file names having following characters:

/:*?"<>|

Here when we try to name a file having ‘/’ in the file name, all the characters are truncated and only that part of the file name is preserved which is free of these characters.

If we simply modify the XML file and remove these characters from the name, everything works fine.

<t:Name>Team COD YongCode QA&Dev Daily Status - 12-4-2015</t:Name> instead of
<t:Name>Team COD YongCode QA&Dev Daily Status - 12/4/2015</t:Name>

Please give it a try and let us know the feedback.

Thank you for your assistance. You may close this case.

Hi,


You are welcome. Please feel free to write to us if you have any additional query related to the API.