Send Email IDN ID

How do I send an email to an email address without an Ascii address, for example, I have adad @ ÄÖß.com as an email address and when I try to send an email to this email address using

sendTo="adad@ÄÖß.com";
MailMessage msg = new MailMessage();
msg.To.Add(sendTo); 

msg.To.Add (sendTo) gives an error message "The specified line is not in the form required for the email address".

Have you guys come across this? Is it possible? If so, Any idea how I can get this to work?

+3
source share
3 answers

Take a look at this one John Skeet is doing his job again.

+2
source

System.Uri IDN. , MailMessage, .

http://msdn.microsoft.com/en-us/library/system.uri.aspx

<configuration>
  <uri>
    <idn enabled="All" />
    <iriParsing enabled="true" />
  </uri>
</configuration>
0

I just found this, it can help you: Convert non-ascii domain to SMTP compatible

0
source

Source: https://habr.com/ru/post/1751346/


All Articles