c# - Unicode character in email not throwing exception -
i have email address unicode character. not throwing exception. using .net mail address overloaded constructor. msdn says throw formatexception when address contains non-ascii characters. unable reproduce exception.
var addr = new system.net.mail.mailaddress("ñ@c.com","test", encoding.utf8); if recognized email address searching character throw exception unit test.
the documentation seems outdated. unicode characters supported since .net 4.0 in mail addresses, see following blog article: http://blogs.msdn.com/b/ncl/archive/2009/08/06/what-s-new-in-system-net-mail.aspx
Comments
Post a Comment