feridekoncuk
asked on
Asp.Net thrown in the mail problem with Russian characters .. Encoding
Hi,
Asp.Net prepared by pressing a button on a page I've written an e-mail address and mail is being taken. Russian characters are thrown in the mail. Ta outlook but these characters??? comes in the form. I changed the regional language settings, default outlook did russian language, the web config file the necessary global ayarlarinida I wrote in an e-mail format to set charset for russian characters, but I did not work. code is as follows :
MailMessage msgMail = new MailMessage();
msgMail.From = "mail@mail.com";
msgMail.To = TextBox3.Text;
msgMail.Subject = "Konu";
msgMail.BodyFormat = MailFormat.Html;
msgMail.Priority = MailPriority.High;
string body = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//RU\">";
body += "<HTML><BODY><META http-equiv=Content-Type content=\"text/html; charset=ISO-8859-5\">";
body += "
¿¿¿¿" + TextBox1.Text + " " + TextBox2.Text + "
";
body += "¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿ ¿¿¿¿¿¿" + kuponkod + "
";
body +="¿¿¿¿¿" + "
";
body +="¿¿¿¿¿¿
";
body += "¿¿¿ ¿¿¿¿¿ ¿¿¿¿.
¿¿¿¿ ¿¿¿.
¿¿¿¿¿¿¿¿ ¿¿¿¿ ¿¿¿¿.
¿¿¿¿¿¿ ¿¿¿¿ ¿¿¿¿¿ ";
body += "
</BODY></HTML>";
msgMail.Body=body;
Can you help me?
thanks.
Asp.Net prepared by pressing a button on a page I've written an e-mail address and mail is being taken. Russian characters are thrown in the mail. Ta outlook but these characters??? comes in the form. I changed the regional language settings, default outlook did russian language, the web config file the necessary global ayarlarinida I wrote in an e-mail format to set charset for russian characters, but I did not work. code is as follows :
MailMessage msgMail = new MailMessage();
msgMail.From = "mail@mail.com";
msgMail.To = TextBox3.Text;
msgMail.Subject = "Konu";
msgMail.BodyFormat = MailFormat.Html;
msgMail.Priority = MailPriority.High;
string body = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//RU\">";
body += "<HTML><BODY><META http-equiv=Content-Type content=\"text/html; charset=ISO-8859-5\">";
body += "
¿¿¿¿" + TextBox1.Text + " " + TextBox2.Text + "
";
body += "¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿ ¿¿¿¿¿¿" + kuponkod + "
";
body +="¿¿¿¿¿" + "
";
body +="¿¿¿¿¿¿
";
body += "¿¿¿ ¿¿¿¿¿ ¿¿¿¿.
¿¿¿¿ ¿¿¿.
¿¿¿¿¿¿¿¿ ¿¿¿¿ ¿¿¿¿.
¿¿¿¿¿¿ ¿¿¿¿ ¿¿¿¿¿ ";
body += "
</BODY></HTML>";
msgMail.Body=body;
Can you help me?
thanks.
Use HTTPUtility.URLEncode...an d the characters would start coming normally
ASKER
Use HTTPUtility.URLEncode...an d the characters would start coming normally
How can I do?
How can I do?
ASKER
I did HttpUtility.UrlEncode("Rus sian karakter")
but it shows as follow;
%3cDIV%3e%d0%a3%d0%b2%d0%b 0%d0%b6%d0 %b0%d0%b5% d0%bc%d0%b 0%d1%8f(%d 1%8b%d0%b9 +z)+
but it shows as follow;
%3cDIV%3e%d0%a3%d0%b2%d0%b
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks , i solve my problem , by HttpUtility.
Try the following settings in web.config
<globalization
fileEncoding="windows-1251
requestEncoding="windows-1
responseEncoding="windows-
responseHeaderEncoding="wi
culture="ru-RU"
uiCulture="ru-RU"
/>
in
<system.web>
node
¿ ¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿ :)