Link to home
Start Free TrialLog in
Avatar of feridekoncuk
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.
Avatar of OMC2000
OMC2000
Flag of Russian Federation image


Try the following settings in web.config

            <globalization
                        fileEncoding="windows-1251"
                        requestEncoding="windows-1251"
                        responseEncoding="windows-1251"
                        responseHeaderEncoding="windows-1251"
                        culture="ru-RU"
                        uiCulture="ru-RU"
            />
in
      <system.web>
node

¿ ¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿ :)
Avatar of dshrivallabh
dshrivallabh

Use HTTPUtility.URLEncode...and the characters would start coming normally
Avatar of feridekoncuk

ASKER

Use HTTPUtility.URLEncode...and the characters would start coming normally

How can I do?
I did HttpUtility.UrlEncode("Russian karakter")

but it shows as follow;

%3cDIV%3e%d0%a3%d0%b2%d0%b0%d0%b6%d0%b0%d0%b5%d0%bc%d0%b0%d1%8f(%d1%8b%d0%b9+z)+
ASKER CERTIFIED SOLUTION
Avatar of OMC2000
OMC2000
Flag of Russian Federation image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks , i solve my problem , by HttpUtility.