title: SmtpException: The client or server is only configured for e-mail addresses with ASCII local-parts
body: <p>The <a href="http://msdn.microsoft.com/en-us/library/swas0fwc.aspx" rel="noreferrer">SmtpClient.Send()</a> method is throwing this exception when I try to send an email to an address containing an accentuated character (é):</p>
  
  <blockquote>
    <p>System.Net.Mail.SmtpException: The client or server is only configured
    for e-mail addresses with ASCII local-parts: léo.xxx@example.com.<br>
      at System.Net.Mail.MailAddress.GetAddress(Boolean allowUnicode)<br>
      at System.Net.Mail.SmtpClient.ValidateUnicodeRequirement(MailMessage...)<br>
      at System.Net.Mail.SmtpClient.Send(MailMessage message)  </p>
  </blockquote>
  
  <p>The formulation of the message makes me thing there might be a setting that I can activate to make this work, though I haven't found anything on this subject.</p>
  
  <p>I have tried several SMTP servers, including Gmail. Here are the relevant bits for a repro:</p>
  
  <p><strong>Code</strong></p>
  
  <pre><code>var msg = new MailMessage();
  msg.Subject = "Test";
  msg.From = new MailAddress("xxx@gmail.com");
  msg.To.Add(new MailAddress("léo.yyy@gmail.com"));
  
  new SmtpClient().Send(msg);
  </code></pre>
  
  <p><strong>app.config</strong></p>
  
  <pre><code>&lt;system.net&gt;
      &lt;mailSettings&gt;
          &lt;smtp from="xxx@gmail.com"&gt;
              &lt;network host="smtp.gmail.com" port="587" userName="xxx@gmail.com" password="password" enableSsl="true" /&gt;
          &lt;/smtp&gt;
      &lt;/mailSettings&gt;
  &lt;/system.net&gt;
  </code></pre>