I have a c# application that uses the standard MailMessage and SmtpClient classes to send emails. This works fine and great. However, we have recently uploaded data from a government agency and some of the email addresses contain french characters. eg Hélène@somedomain.com
When I send an email to the french email address I get the following exception:
an invalid character was found in the mail header: é
My questions are :
- Is it possible to use c# to send an email to an address containing french accented characters?.
- If yes, then How?
Url encoding of the french character
éisYou can use:
Which gives the correct encoded output:
%E9