Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
|
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 29th, 2004, 12:37 PM
Friend of Wrox
 
Join Date: May 2004
Posts: 120
Thanks: 0
Thanked 1 Time in 1 Post
Default problem in web email encoding

i am using a webMail object to sending email and i can send email but
the the mwssagw encoding is wrong and the received email is unreadible and each character replaced with '?' mark how i can correct it to use unicode encoding utf-8.
the code is this.
<%
MailMessage msgMail = new MailMessage();
Encoding unicode = Encoding.Unicode;
msgMail.BodyEncoding= unicode ;
msgMail.To ="[email protected]";
msgMail.Cc = "[email protected]";
msgMail.From = "[email protected]";
msgMail.Subject = "Hi Chris, another mail";

msgMail.BodyFormat = MailFormat.Html;
msgMail.Subject = "ÇÚáÇã ÚÖæíÊ ÏÑ ÓÇíÊ ICT ÇÑÏÈíá";
string strBody="ÓáÇã";
 msgMail.Body = strBody;

SmtpMail.Send(msgMail);

Response.Write("Email was queued to disk");
%>
thanx in advance. YoOrD

__________________
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;YoOrD .
Beauty is not on the face
Beauty is on the heart
~~&lt;&lt;Ghibran Khalil&gt;&gt;~~
 
Old June 29th, 2004, 10:58 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

Dear yoord: ur codes r already fine, & Since u make ur e-mail by Unicode cant seen in normal Encoding, so u have only 2 ways,
1_ Use <meta> in ur Body to change its coding automaticly as
Code:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
2_ Or Warn Ppl who u send email & tell them to change Encoding.

HTH.

Always:),
Hovik Melkomian.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Web Form Email Job Problem kwilliams ASP.NET 2.0 Professional 2 June 24th, 2008 02:27 PM
CDO email attachment encoding fails headstrong Classic ASP Basics 1 March 27th, 2007 05:28 AM
Encoding problem. Neal XML 0 April 4th, 2006 06:49 AM
JSP encoding problem! recepkocur Servlets 1 January 24th, 2005 04:54 AM
JSP encoding problem recepkocur Apache Tomcat 0 December 3rd, 2004 02:44 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.