tags:

views:

114

answers:

1

We're experiencing errors when someone tries to send an email using non-English characters (á é ñ). Is there a specific configuration that needs to be made on the SMTP server or in code?

This is the error that we're getting:

System.FormatException: The specified string is not in the form required for an e-mail address.
  at System.Net.Mime.MailBnfHelper.ReadMailAddress(String data, Int32& offset, String& displayName)
  at System.Net.Mail.MailAddress.ParseValue(String address)
  at System.Net.Mail.MailAddress..ctor(String address, String displayName, Encoding displayNameEncoding)
  at System.Net.Mail.MailAddress..ctor(String address)
+1  A: 

That looks like they're trying to send to/from an address with non-English characters in.

As far as I can tell, RFC 2822 only supports ASCII within email addresses.

Jon Skeet
It seems like unicode support is a bit experimental at the moment and "supported" by a few clients. http://en.wikipedia.org/wiki/Unicode_and_e-mail
Jim Geurts
I haven't looked closely, but I suspect that for email addresses, it's still only the display name which can contain Unicode. I suppose Punycode might help too, but I haven't seen that being used.
Jon Skeet