Hi,
thanks for your reply. I don’t think, that’s the problem is the DLL file.
In the ViewMsg Solution of you, I tested the Email with special characters in the attachments name with an email which I drag out from outlook to the desktop.
This works fine with the characters.
If I try to load the email, which I have saved with the code below, the characters won’t be displayed as I want (same problem as I explained):
Here is the Code:
SPFile datei = properties.ListItem.File;
byte[] fileBuffer = datei.OpenBinary();
string path = “c:\temp\Emailkategorisierung\Emails\” + datei.Name;
FileStream stream = new FileStream(path, FileMode.Create);
stream.Write(fileBuffer, 0, fileBuffer.Length);
stream.Close();
MapiMessage email = MapiMessage.FromFile(“c:\temp\Emailkategorisierung\Emails\” + datei.Name);
This MapiMessage don’t work with the characters. You told me, that you have tested it with a class library with Sharepoint.
Can you please post your code, how you have load the file to the MapiMessage from Sharepoint?
I think this could solve my problem. I think the problem is anywhere in Sharepoint or how Sharepoint save the emails, I’m not sure.
Thanks a lot
UPDATE
I have tested following secaniro:
I uploaded a email with sharepoint (Upload file - choose file - click upload and then the file is in the sharepoint) and after that I downloaded this email again (rigt click - save as) and then try to read the attachments with the ViewMsg solution.
THIS WORKS!!!
When I upload a Email from Outlook to Sharepoint programmatically (Outlook Addin in C#, a simply save as function) then the attachment names won’t be display correct (but only in the aspose mailmessage/mapimessage). If I open this email with outlook, there’s no problem or something else.
Same problem if I open any email in outlook, go to File - Save As - http://sharepoint/docbib/test.msg
and download this file back to desktop and test it with view msg. So the problem isn’t from my outlook addin, the problem must be on your class library or outlook?!?
Can you check how you load the attachment namens in the mapimessage class? maybe there is another way ??