ASP classic CDO Email messaging use UTF-8 in textbody

不羁岁月 提交于 2019-12-29 08:37:06

问题


How can i send email by using UTF-8 charset. Kindly note that I need to use it in textbody and not in htmlbody.

Everythings working fine if I uses it in htmlbody but when I tried to used textbody. I got aschii code character

objCDOMailer.TextBody  = "test - Rozwiązanie"  >> having a problem
objCDOMailer.HTMLBody  = "test - Rozwiązanie"  >> dont have a problem

I used the code below for both above.

  objMail.BodyPartCharset = "UTF-8"

回答1:


use

bjCDOMailer.TextBodyPart.Charset = "utf-8" 

for charcter encoding.

objCDOMailer.BodyPart.Charset = "utf-8" 
objCDOMailer.HTMLBodyPart.Charset = "utf-8"

Above's are not working .




回答2:


Try setting the encoding individually for TextBody and HTMLBody

objCDOMailer.BodyPart.Charset = "utf-8" 
bjCDOMailer.TextBodyPart.Charset = "utf-8" 
objCDOMailer.HTMLBodyPart.Charset = "utf-8"


来源:https://stackoverflow.com/questions/9061974/asp-classic-cdo-email-messaging-use-utf-8-in-textbody

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!