I struggled yesterday with a stupid problem. I have this german client and we've built a website for it. Of course, on the website you have some forms to contact the company by email. The email receiver of these emails is a strange email address that contains special character like "ö". Of course that an email address like röny@domain.com (this address is just an example) does not respect the standards (http://www.faqs.org/rfcs/rfc822.html), but since that's the client's address ...

In .NET sending an email with such an email address results in an error being thrown. The error says, of course, that the email address is not well formatted. At first I thought that I'm missing a text encoding, afterwards I thought I needed an HTML encoding. None of them worked whatsoever. After some tests I discoverred that I had to use an URL encoding, so this kind of email addresses must be URL encoded in order to programatically send emais. After encoding my email address would look like this: r%F6ny@domain.com.

I hope you will find this info helpfull.

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5