Mail Attachment Names contains Question Marks instead of umlauts

Last post 07-09-2009, 1:33 AM by gradma. 20 replies.
Page 1 of 2 (21 items)   1 2 Next >
Sort Posts: Previous Next
  •  05-18-2009, 4:33 AM 180017

    Mail Attachment Names contains Question Marks instead of umlauts .NET

    Attachment: Present (inaccessible)

    Hi,

    I have a Problem.

    I want to load a MSG Email File into MapiMessage to extract the Attachments to the disk.

    Here is the code:

    MapiMessage email = MapiMessage.FromFile("c:\\temp\\Emailkategorisierung\\Emails\\" + datei.Name);

    Aspose.Network.Outlook.MapiAttachmentCollection meineanlagen = email.Attachments;

    string Anlagennamen = "";

    for (int i = 0; i < meineanlagen.Count; i++)

    {

    meineanlagen[i].Save("c:\\temp\\Emailkategorisierung\\Emailanlagen\\" + meineanlagen[i].LongFileName);

    }

    So I can't save Emails with Umlaut(ä,ü,ß,ö,...) because instead of this characters, there will shown question marks ("?") and so there's a exception that I can't save the File because in the Filename there is a "?".

    Then I decided to load the MSG Mail into a MailMessage Class, but there are all attachments away, only 1 attachement called licenses.txt is in it (I think because the evaluation version).

    In the Attachment there's a Testmail. I need quickly a solution please.

    Thanks for your help

     

     
  •  05-19-2009, 8:03 AM 180388 in reply to 180017

    Re: Mail Attachment Names contains Question Marks instead of umlauts .NET

    Hi,

    Thanks for considering Aspose.

    Please try the latest hotfix from http://www.aspose.com/community/files/51/file-format-components/aspose.network-for-.net/entry179958.aspx.

    If you still encounter problem after using the above dll, please mention your environment, e.g. Operating System (x86/x64) and .NET framework version. We will do the tests in similar environment to analyze the problem.


    Best Regards,
    Saqib Razzaq
    Support Developer, Aspose Sialkot Team
    http://www.aspose.com
    Your File Format Experts
     
  •  05-20-2009, 1:15 AM 180533 in reply to 180388

    Re: Mail Attachment Names contains Question Marks instead of umlauts

    Attachment: Present (inaccessible)

    Hi,

    the same problem again.

    In the attachments of this post you see a screenshot, that the attachment names of the email with ä,ü,ö,ß contains question marks (?) instead of this characters.

    I develop on a x86 windows server 2003 with .net framework 3.5 inclusive .net framework 3.5 SP1

    Can you help me please?

    Thanks a lot

     

     
  •  05-20-2009, 3:45 AM 180556 in reply to 180533

    Re: Mail Attachment Names contains Question Marks instead of umlauts

    Hi,
    Maybe this could be a solution for you. I tested it with umlauts and it works.
          
    MailMessage mailMessage = MailMessage.Load(txtInputTemplate.Text,   MessageFormat.Msg);
                mailMessage.BodyEncoding = Encoding.Unicode;
                foreach (Attachment attachment in mailMessage.Attachments)
                {
                    attachment.NameEncoding = Encoding.Unicode;
                    attachment.Save("c:\\temp\\" + attachment.Name);
                }





    Regards
    Swisscomdev
     
  •  05-20-2009, 6:30 AM 180612 in reply to 180556

    Re: Mail Attachment Names contains Question Marks instead of umlauts

    Hi,

    thank's a lot for your code, but the problem is this.

    I have the evaluation version of aspose network because we want to decide if we will buy this library. If I use the MailMessage class instead of MapiMessage, the attachments of the email will not be shown, only 1 attachment (license.txt) will be display and so I can't test it with my umlauts...

    can anyone of the support team help me

     
  •  05-21-2009, 5:50 AM 180818 in reply to 180612

    Re: Mail Attachment Names contains Question Marks instead of umlauts .NET

    Hi,

    Thanks for considering Aspose.

    Could you please run the attached sample application on your system?

    The executable folder contains the exe and Aspose.Network.dll file. It will open the dialog box for opening the file and will show the filename on the screen. It worked in my environment here (Windows 2003 Server x86 and .NET 2.0/3.5 sp1). Please test whether it works for you.


    Best Regards,
    Saqib Razzaq
    Support Developer, Aspose Sialkot Team
    http://www.aspose.com
    Your File Format Experts
     
  •  05-22-2009, 12:57 AM 180961 in reply to 180818

    Re: Mail Attachment Names contains Question Marks instead of umlauts

    I can't see a attached file on your post??
     
  •  05-22-2009, 2:09 AM 180975 in reply to 180961

    Re: Mail Attachment Names contains Question Marks instead of umlauts .NET

    Attachment: Present (inaccessible)

    Hi,

    Sorry, I forgot to attach the files. Please download from this post.


    Best Regards,
    Saqib Razzaq
    Support Developer, Aspose Sialkot Team
    http://www.aspose.com
    Your File Format Experts
     
  •  05-25-2009, 1:33 AM 181136 in reply to 180975

    Re: Mail Attachment Names contains Question Marks instead of umlauts

    Hello again,

     

    your test program works with ä,ö etc in the attachment names using mapimessage. using the mailmessage class there will only shown "License.txt", because of the evaluation version i think.

    why doesn't work this in my program with this characters?What have you done instead of my code??

     

    Thanks for your help

     
  •  05-25-2009, 10:43 AM 181210 in reply to 181136

    Re: Mail Attachment Names contains Question Marks instead of umlauts

    Hello,

    Could you help to try the latest hotfix? It is fixed in the latest dll. I have tested with your code and MailMessage class.

      MailMessage msg = MailMessage.Load(file, MessageFormat.Msg);
                for (int i = 0; i < msg.Attachments.Count; i++)
                {
                    msg.Attachments[i].Save(msg.Attachments[i].Name);
                }
      msg.Save("Msg_AttachmentLoadIssue_20090525_Test.eml");

    http://www.aspose.com/community/files/51/file-format-components/aspose.network-for-.net/entry179958.aspx

    Thanks,

     


    Team Lead
    Aspose Guangzhou Team
    About Us

    Contact Us
     
  •  05-27-2009, 2:14 AM 181392 in reply to 181210

    Re: Mail Attachment Names contains Question Marks instead of umlauts

    I tried this hotfix, but this didn't solve the problem...

    With your test solution I open the Testmail an den characters will shown correctly, but if I use it on my solution, there are always question marks instead of ö,ü,...

    I don't know what's the different between your solution... I have a ClassLibrary Project and you have a Forms Application but this can't be the reason...

    Can I do something else?

     
  •  05-27-2009, 6:16 AM 181452 in reply to 181392

    Re: Mail Attachment Names contains Question Marks instead of umlauts

    Attachment: Present (inaccessible)

    Look at my screenshot... here you can see that I use exactly the same code as in your forms application... and of course the same Aspose Library (from your folder)....

    The email is exactly the same as the mail which I used for testing it with your forms application

     
  •  05-27-2009, 7:41 AM 181467 in reply to 181452

    Re: Mail Attachment Names contains Question Marks instead of umlauts .NET

    Hi,

    Could you please try the Aspose.Network.dll, that is included in my sample (attached to the previous post). See if you still get the question marks instead of correct characters.


    Best Regards,
    Saqib Razzaq
    Support Developer, Aspose Sialkot Team
    http://www.aspose.com
    Your File Format Experts
     
  •  05-28-2009, 1:19 AM 181576 in reply to 181467

    Re: Mail Attachment Names contains Question Marks instead of umlauts

    Yes I tested this hotfix but without any success...

    I don't understand why it works in the form application and not in my library.

    Here my scenario:

    We use Microsoft Sharepoint. I upload outlook emails to a Sharepoint Library, then a eventhandler save this email back to C:\Temp and then I try to read the attachments with the MapiMessage, that's all what I do.

    I develop with Visual Studio 2008, Windows Server 2003, .NET Framework 3.5

    The mistake must be on another side, because the DLL works I think, because with the form test application from you it works. Have you tried it with a non-form application (only a library or console or something like that)?

    We have to find a solution for that, because we are very intereseted in buying this Library but we need to solve this problem first.

     

     
  •  05-28-2009, 5:21 AM 181591 in reply to 181576

    Re: Mail Attachment Names contains Question Marks instead of umlauts .NET

    I will do some tests with other project types (non-winform applications) and a similar scenario like yours (create a dll and read the msg file from SharePoint document library) and will post my findings here shortly.
    Best Regards,
    Saqib Razzaq
    Support Developer, Aspose Sialkot Team
    http://www.aspose.com
    Your File Format Experts
     
Page 1 of 2 (21 items)   1 2 Next >
View as RSS news feed in XML