R
Roberto Rocco
Hello,
I'm using VS 2005 and I need to send a mail body which contains german
umlauts (ä,ö,ü).
When I receive the mail in Outlook 2003 (english operating system) I always
get a '|' or other similar symbols instead of the expected umlaut.
I'm using Sstem.Net.Mail and I already tried something like this:
string body = "this is some sample äöüÄÖÜß HTML text";
System.Net.Mail.AlternateView htmlView =
System.Net.Mail.AlternateView.CreateAlternateViewFromString(body,
Encoding.Unicode, "text/html");
mail.AlternateViews.Add(htmlView);
and also this:
string body = "this is some sample äöüÄÖÜß HTML text";
System.Net.Mail.AlternateView htmlView =
System.Net.Mail.AlternateView.CreateAlternateViewFromString(body,
Encoding.GetEncoding("iso-8859-1"), "text/html");
mail.AlternateViews.Add(htmlView);
In both cases I receive the wrong message body without the umlauts.
What am I doing wrong? Am I missing something?
Many thanks in advance,
Roberto Rocco.
I'm using VS 2005 and I need to send a mail body which contains german
umlauts (ä,ö,ü).
When I receive the mail in Outlook 2003 (english operating system) I always
get a '|' or other similar symbols instead of the expected umlaut.
I'm using Sstem.Net.Mail and I already tried something like this:
string body = "this is some sample äöüÄÖÜß HTML text";
System.Net.Mail.AlternateView htmlView =
System.Net.Mail.AlternateView.CreateAlternateViewFromString(body,
Encoding.Unicode, "text/html");
mail.AlternateViews.Add(htmlView);
and also this:
string body = "this is some sample äöüÄÖÜß HTML text";
System.Net.Mail.AlternateView htmlView =
System.Net.Mail.AlternateView.CreateAlternateViewFromString(body,
Encoding.GetEncoding("iso-8859-1"), "text/html");
mail.AlternateViews.Add(htmlView);
In both cases I receive the wrong message body without the umlauts.
What am I doing wrong? Am I missing something?
Many thanks in advance,
Roberto Rocco.