Reputation: 8923
How do I send email to non-Ascii email ID, for example I have adad@ÄÖß.com as emailID and when I try to send email to this emailID using
sendTo="adad@ÄÖß.com";
MailMessage msg = new MailMessage();
msg.To.Add(sendTo);
msg.To.Add(sendTo) throws an error saying "The specified string is not in the form required for an e-mail address.".
Did you guys face this ever? Is this possible? if yes, Any idea of how I can get this working?
Upvotes: 3
Views: 611
Reputation: 9739
I just found this, it might help you: Convert non-ascii domain to SMTP compatible
Upvotes: 0
Reputation: 9739
System.Uri
has a config parameter for IDN support. I'm not sure if this affects MailMessage
, too, or if there is an additional parameter for it.
http://msdn.microsoft.com/en-us/library/system.uri.aspx
<configuration>
<uri>
<idn enabled="All" />
<iriParsing enabled="true" />
</uri>
</configuration>
Upvotes: 0