Connecting Tech Pros Worldwide Help | Site Map

sending unicode email

  #1  
Old June 29th, 2009, 07:18 AM
Newbie
 
Join Date: Feb 2009
Posts: 23
i want to send Unicode email in asp by CDOSYS

first i design my template in temp.htm
i add this line:
Expand|Select|Wrap|Line Numbers
  1. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
then i save temp.htm as temp.txt and change encoding as utf-8

when i want to send email i replace some text in temp.txt by replace function (replaced text come from database and all database field are unicode)

i add this line to all my asp page:
Expand|Select|Wrap|Line Numbers
  1. <%@ CodePage=65001  %>
when i want to send email use following code:
Expand|Select|Wrap|Line Numbers
  1. Set myMail=CreateObject("CDO.Message")
  2. myMail.Subject="unicode subject"
  3. myMail.From="some@some.txt"
  4. myMail.To=r"some@some.txt"
  5. myMail.HTMLBody = emailtext
  6. myMail.Send
  7. set myMail=nothing
after send i check my mail:
replaced text were WordCap
original Text were displayed correctly
subject was WordCap

after i add this line:
myMail.BodyPart.charset = "UTF-8"
subject was displayed correctly but replaced text were WordCap still

after i add this line:
myMail.HTMLBody.charset = "UTF-8"
this error Displayed:
Microsoft VBScript runtime error '800a01a8'
Object required: '[string: "<html dir="rtl"> "]'
/send.asp, line 35
  #2  
Old June 29th, 2009, 07:28 AM
Newbie
 
Join Date: Feb 2009
Posts: 23

re: sending unicode email


after send i user response.write command to view text in my browser. A strange event happenedو Everything was contrary:
Original text were WordCap
replaced Text was displayed correctly
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
SMTP Sending Issue Marty answers 8 August 11th, 2008 04:55 PM
Sending Unicode Email using CDOSys drops characters Jason answers 3 November 22nd, 2005 11:08 PM
Sending Unicode Email using CDOSys drops characters Jason answers 3 September 28th, 2005 07:05 AM
Unicode and html - help for simple web site chri_schiller@yahoo.com answers 24 September 2nd, 2005 08:15 PM