Mail Subject Encoding - Text garbled on iPhone and Mac

Last post 02-06-2012, 6:59 AM by babar.raza. 14 replies.
Sort Posts: Previous Next
  •  12-08-2011, 3:50 AM 347768

    Mail Subject Encoding - Text garbled on iPhone and Mac .NET

    Attachment: Present (inaccessible)
    Hey Aspose
    We sometimes get the subjects of Messages messed up (see screenshots).

    Subject:
    Valentin Hernandez Lima hat Geschäftsbrief 14251 erledigt

    This is how the header details look:

    Return-Path: <info@supertext.ch>
    Received: from compute6.internal (compute6.nyi.mail.srv.osa [10.202.2.46])
         by slots14b1p3 (Cyrus git2.5+0-git-fastmail-7540) with LMTPA;
         Wed, 07 Dec 2011 13:48:08 -0500
    X-Sieve: CMU Sieve 2.4
    X-Spam-charsets: subject='utf-8', plain='utf-8'
    X-Resolved-to: supertext@fastmail.fm
    X-Delivered-to: info@supertext.ch
    X-Mail-from: info@supertext.ch
    Received: from mx4.nyi.mail.srv.osa ([10.202.2.203])
      by compute6.internal (LMTPProxy); Wed, 07 Dec 2011 13:48:08 -0500
    Received: from DED191.maximumasp.com (ded191.maximumasp.com [209.162.186.147])
        by mx4.nyi.mail.srv.osa (Postfix) with ESMTP id E2C20180C9E
        for <info@supertext.ch>; Wed,  7 Dec 2011 13:48:07 -0500 (EST)
    Received: from DED191.maximumasp.local ([209.162.186.147]) by DED191.maximumasp.com with Microsoft SMTPSVC(7.5.7600.16544);
         Wed, 7 Dec 2011 13:48:06 -0500
    From: "Supertext System" <info@supertext.ch>
    To: "Supertext Crew" <info@supertext.ch>
    Subject: 
     =?utf-8?B?VmFsZW50aW7CoEhlcm5hbmRleiBMaW1hIGhhdCBHZXNjaMOkZnRzYnJpZWbC?=
     =?utf-8?B?oDE0MjUxIGVybGVkaWd0?=
    MIME-Version: 1.0
    Content-Type: text/plain; charset=utf-8
    Content-Transfer-Encoding: quoted-printable
    Message-ID: <DED191GryWtIIZS2TRq00000bbf@DED191.maximumasp.com>
    X-OriginalArrivalTime: 07 Dec 2011 18:48:06.0771 (UTC) FILETIME=[C21D5C30:01CCB510]
    Date: 7 Dec 2011 13:48:06 -0500
    X-Truedomain-Domain: supertext.ch
    X-Truedomain-SPF: No Record
    X-Truedomain-DKIM: No Signature
    X-Truedomain-ID: AEF78022E2B2634AB2E00D8ED0F85BF5
    X-Truedomain: Neutral

    And this is my code:

    Aspose.Email.Mail.MailMessage msg = new Aspose.Email.Mail.MailMessage();

    msg.From = new Aspose.Email.Mail.MailAddress(fromEmail, fromName);

    msg.To.Add(new Aspose.Email.Mail.MailAddress(toEmail, toName));

    msg.Subject = Subject;
    msg.SubjectEncoding = System.Text.Encoding.UTF8;

    msg.TextBody = Message;
    msg.BodyEncoding = System.Text.Encoding.UTF8;

    Aspose.Email.Mail.SmtpClient client;
    client = new Aspose.Email.Mail.SmtpClient(settings.Host);
    client.DeliveryMethod = Aspose.Email.Mail.SmtpDeliveryMethod.Network;
    client.AuthenticationMethod = Aspose.Email.Mail.SmtpAuthentication.None;
    client.Send(msg);

    We couldn't find a pattern when this happens. Other messages with "Umlauts" work. Also longer subjects work too. Any idea? 
    We are using Version 1.1.0.0 on a Windows 2008 R2 Server.

    Cheers

    Remy

    Filed under: Encoding;Mail;Subject
     
  •  12-08-2011, 8:59 AM 347871 in reply to 347768

    Re: Mail Subject Encoding - Text garbled on iPhone and Mac .NET

    Hi Remy,

    Apologies for your inconvenience.

    I am trying to replicate your said issue with Aspose.Email for .NET v1.2.0 but so far I haven't succeeded. I am using the same source code as provided by you to create the message and send the it to myself via gmail smtp. Then I receive the message on Outlook 2010 and it looks just fine.

    Does this issue occur only on iPhone and MAC platforms? Can you please give a try to the latest version (link shared above) and let us know of your results. 

    Thank you

    Babar Raza
    Support Developer,
    Aspose Sialkot Team
    http://www.aspose.com/
    Aspose - Your File Format Experts
     
  •  12-08-2011, 9:08 AM 347877 in reply to 347871

    Re: Mail Subject Encoding - Text garbled on iPhone and Mac

    Yes, this only happens on the iPhone and on Mac Mail. Will try the new version and let you know.
     
  •  12-09-2011, 1:39 AM 348044 in reply to 347877

    Re: Mail Subject Encoding - Text garbled on iPhone and Mac .NET

    Hi,

    We have tested your scenario with iPhone and we are unable to replicate your said issue by using Aspose.Email for .NET v1.1.0. Soon we will get back to you with our results on MAC platform.

    Meanwhile, can you please share your scenario in more detail and provide us any pre-processing steps if involved.

    Looking forward to hear from you.

    Babar Raza
    Support Developer,
    Aspose Sialkot Team
    http://www.aspose.com/
    Aspose - Your File Format Experts
     
  •  12-12-2011, 8:07 AM 348569 in reply to 348044

    Re: Mail Subject Encoding - Text garbled on iPhone and Mac

    We rolled 1.2 out to our Dev Environement and currently I cannot reproduce the issue either. We will release it to Production and see if it stays  like that.

    Thanks for the quick reply and sorry if I wrote you too quickly.
     
  •  12-13-2011, 10:43 AM 348953 in reply to 348569

    Re: Mail Subject Encoding - Text garbled on iPhone and Mac

    Hey Aspose
    We actually had another case today in Production with the new 1.2 Version.

    Subject:
    Cornelia Buttmann-Scholl hat Direct Mailing 14328 erledigt

    to:
    remy@supertext.ch (Supertext)

    from:
    info@supertext.ch (Supertext)

    Message:
    Korrekturlesen

    Changing the message and the names did not change the result, but changing the subject to:
    XCornelia Buttmann-Scholl hat Direct Mailing 14328 erledigt

    solved it.
     
  •  12-14-2011, 1:13 AM 349081 in reply to 348953

    Re: Mail Subject Encoding - Text garbled on iPhone and Mac .NET

    Hi,

    Thank you for your feedback.

    We are trying to replicate your said issue on iPhone and MAC OS but so far we haven't succeeded. If you find any recurrence pattern, please let us know.

    Regards,

    Babar Raza
    Support Developer,
    Aspose Sialkot Team
    http://www.aspose.com/
    Aspose - Your File Format Experts
     
  •  12-14-2011, 5:00 AM 349139 in reply to 349081

    Re: Mail Subject Encoding - Text garbled on iPhone and Mac

    Attachment: Present (inaccessible)
    I've attached some example code. Button2_Click reproduces the issue on my side.

    We have Windows Server 2008 RS with IIS 7. 
    We are using the internal IIS mailserver to send these mails.

    It's an ASP.NET 4.0 application running in integrated mode. Everything should be UTF-8.

    What other information could help?
     
  •  12-14-2011, 9:21 AM 349238 in reply to 349139

    Re: Mail Subject Encoding - Text garbled on iPhone and Mac .NET

    Hi,

    Thank you for your help.

    I am able to reproduce the said issue on iPhone. So I have logged it in our bug tracking system under ticket id 32659 for the sake of correction.

    We will soon figure this out and will let you know as soon as possible.

    Regards,

    Babar Raza
    Support Developer,
    Aspose Sialkot Team
    http://www.aspose.com/
    Aspose - Your File Format Experts
     
  •  12-14-2011, 9:30 AM 349241 in reply to 349238

    Re: Mail Subject Encoding - Text garbled on iPhone and Mac

    Ok, thanks a lot.
     
  •  01-26-2012, 1:48 AM 357353 in reply to 349241

    Re: Mail Subject Encoding - Text garbled on iPhone and Mac .NET

    Attachment: Present (inaccessible)
    Hi Remy,

    We regret to inform you that the subject encoding problem logged earlier under ticket Id NETWORKNET-32659, is not caused by Aspose.Email for .NET component. In our investigation, we have found that the symbol "Â" is the part of message subject before it is sent to any recipient. Please check the snapshot attached for your reference. Its a binary view of MailTest.aspx.cs file shared by you. You can see that the symbol "Â" is appended with the words "Cornalia" and "Mailing". 

    Please verify this on your end and let us know of your feedback on this. 

    Thank you.

    Babar Raza
    Support Developer,
    Aspose Sialkot Team
    http://www.aspose.com/
    Aspose - Your File Format Experts
     
  •  01-31-2012, 2:14 AM 358235 in reply to 357353

    Re: Mail Subject Encoding - Text garbled on iPhone and Mac

    Thanks for your research. Sounds feasible. Unfortunately, in my HexEditor I cannot see these signs. Could it be an issue with the File Encoding? 
    I opened the file with FlexHex. But in any case, I have no idea where this could come from...
     
  •  02-06-2012, 4:25 AM 359421 in reply to 358235

    Re: Mail Subject Encoding - Text garbled on iPhone and Mac .NET

    Hi Remy,

    As I have shared a snapshot showing these characters in your provided source code file. I believe these characters got pasted when you copied the string for the message subject in your source code file. For further investigation, you may check the origin of the Subject string.

    Please do share your investigation results with us.
    Thanks

    Babar Raza
    Support Developer,
    Aspose Sialkot Team
    http://www.aspose.com/
    Aspose - Your File Format Experts
     
  •  02-06-2012, 4:31 AM 359424 in reply to 359421

    Re: Mail Subject Encoding - Text garbled on iPhone and Mac

    Yes, I understand.
    But I cannot find those characters on my side with my Hex tool, that is why I asked what tool you are using, so I can try to find the place where these characters are coming from. I assume it's some UTF - ANSI mismatch somewhere. 
     
  •  02-06-2012, 6:59 AM 359465 in reply to 359424

    Re: Mail Subject Encoding - Text garbled on iPhone and Mac .NET

    Hi Remy,

    We have used Total Commander Lister (in hex mode). Alternatively, you may use AraxisMerge. Please don't forget to select "View-AsBinary" when using AraxisMerge.

    Regards,

    Babar Raza
    Support Developer,
    Aspose Sialkot Team
    http://www.aspose.com/
    Aspose - Your File Format Experts
     
View as RSS news feed in XML