Backslash was dropped from header value

Hi there,

When we load EML and add it to PST, we found that backslash in the header value was dropped.
For example:

To: test@test.com, abc@aaa"aaa.com, a b \c
Junk: ~!@#$%^&*()_+1234567890-={}|[]\:";'<>?,./<br><br>After I added the message to PST, then imported to outlook, I found that those two headers were changed to:<br>To: test@test.com, abc@aaa"aaa.com, "a b c"<br>Junk: ~!@#$%^&*()_+ 1234567890-={}|[]:";’<>?,./

For the first to header a b \c was changed to "a b c"
For the second junk header: was dropped

Why Aspose.Email will make those changes? Should we just use whatever we read from the EML if outlook was not rejecting those characters?

Hi,


Thank you for your inquiry.

I tried to get hold of one such message file by creating it myself, but the header’s don’t support such values. Can you please share a sample EML/MSG file with such headers information? We shall look into it for further investigation and share our findings with you.

Please check attached EML file.

Hi Ying,


In the LocalPart section of this article, it says that:

The restrictions for special characters are that they must only be used when contained between quotation marks, and that 2 of them (the backslash \ and quotation mark " (ASCII: 92, 34)) must also be preceded by a backslash \ (e.g. “\"”)”.

In your sample file, there is a single backslash that the API is considering as a line break and ignoring it during conversion from MailMessage to MapiMessage. In my opinion, this issue can be further investigated once we have the enhancement EMAILJAVA-33463 in place.