We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Exception when setting mail recipients with unicode character

Hi,

I get an exception when doing the following:


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

mail.To="mælkevej@hotmail.com";


Any possible workarounds?

Hi,


Thank you for using Aspose products.

Please share the exception message and the version of Aspose.Email for .NET that you are using. As an alternative, please try as below with latest version of Aspose.Email for .NET v1.1.0

C#

MailMessage message = new MailMessage();

message.To = new MailAddress("abc@domain.com");

Hi,


I tried with the latest version to no avail.

I’m getting the following exception:

FormatException
An invalid character was found in the mail header.
Message

An invalid character was found in the mail header.

Data
IDictionary (0 items)
InnerException null
StackTrace at ‰.Ÿ.‡(String , Int32& , StringBuilder )
at ‰.Ÿ.†(String , Int32& , StringBuilder )
at ‰.Ÿ.Ž(String data, Int32& offset, String& displayName, Boolean checkAddress)
at ‰.Ÿ.Ž(String , Int32& , Boolean )
at Aspose.Email.Mail.MailAddressCollection.˜(String , Boolean )
at Aspose.Email.Mail.MailAddressCollection.op_Implicit(String addresses)
HelpLink null
Source

Aspose.Email

Hi,


I am afraid, it seems that the problem is with your message. Please provide us your sample message file for our review.

Thank you.

Hi,


I’m not loading any message file. My entire sample code is the one I included in my original post:


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

mail.To=“mælkevej@hotmail.com”;


The error seems to be due to the fact the e-mail address contains an unicode character: æ.

Hi,


Thank you for the clarification.

I am able to replicate the problem with unicode character in email address. For investigative purposes I have logged a ticket in our tracking system. The ticket Id for your reference is 32477.

We will keep you posted with updates.

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


This message was posted using Notification2Forum from Downloads module by aspose.notifier.