MailAddress : problem with long encoded display name

Hello,


We encounter a blocking problem using MailAddress (Aspose Email 2.8) and encoded long display name.

This code works for a short encoded display name :
MailMessage mm = new MailMessage();
mm.To.Add(new MailAddress(“test@example.com”, “é 0123456789”, Encoding.GetEncoding(“iso-8859-15”)));
mm.From = new MailAddress(“test@example.com”);
mm.TextBody = “Test TO”;
mm.Save(@“c:\temp\ok_short.eml”, MailMessageSaveType.EmlFormat);

It works for a long non encoded display name (even if it generates an unnecessary line break at the beginning of the resulting eml To header) :
MailMessage mm.To.Add(new MailAddress(“test@example.com”, “e 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789”, Encoding.GetEncoding(“iso-8859-15”)));
mm.From = new MailAddress(“test@example.com”);
mm.TextBody = “Test TO”;
mm.Save(@“c:\temp\ok_long.eml”, MailMessageSaveType.EmlFormat);

But it fails for a long encoded display name :
MailMessage mm = new MailMessage();
mm.To.Add(new MailAddress(“test@example.com”, “é 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789”, Encoding.GetEncoding(“iso-8859-15”)));
mm.From = new MailAddress(“test@example.com”);
mm.TextBody = “Test TO”;
mm.Save(@“c:\temp\nok_long.eml”, MailMessageSaveType.EmlFormat);

Here is the resulting eml for the last example :
To: “
=?utf-8?B?w6kgMDEyMzQ1Njc4OSAwMTIzNDU2Nzg5IDAxMjM0NTY3ODkgMDEyMzQ1Njc4? =?utf-8?B?OSAwMTIzNDU2Nzg5IDAxMjM0NTY3ODkgMDEyMzQ1Njc4OQ==?=” test@example.com
From: test@example.com
Content-Type: text/plain; charset=“us-ascii”
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0

Test TO

Regards,
AVM Informatique

Hi florent,


Thanks for writing to Aspose.Email support team.

I have analyzed the information and have successfully re-produced the issue here. I have passed this information to the development team along with the sample code. Developers will analyze it and I will write back to you, as soon as some feedback is received from the development team.

This issue is logged with id: NETWORKNET-33732 in our issue tracking system.

The issues you have found earlier (filed as NETWORKNET-33732) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.