i want to send Unicode email in asp by CDOSYS
first i design my template in temp.htm
i add this line:
- <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:
when i want to send email use following code:
-
Set myMail=CreateObject("CDO.Message")
-
myMail.Subject="unicode subject"
-
myMail.From="some@some.txt"
-
myMail.To=r"some@some.txt"
-
myMail.HTMLBody = emailtext
-
myMail.Send
-
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