我们目前正在将邮件投放系统更改为仅使用UTF-8
。
当电子邮件包含非ASCII字符(希伯来语)时,发件人姓名似乎存在问题。正文渲染确定,但我的Gmail帐户中显示的发件人姓名变为 - ??????
。
有一行代码:
myMail.BodyPart.Charset = "UTF-8"
所以我认为应该有类似的代码:
myMail.SenderName.Charset = "UTF-8"
但我似乎无法找到合适的代码,假设这样可以解决问题。
答案 0 :(得分:1)
这对我有用:http://www.powerasp.net/content/new/sending_email_cdosys.asp
Dim ObjSendMail
Set ObjSendMail = CreateObject("CDO.Message")
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "myserver"
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
ObjSendMail.Configuration.Fields.Update
ObjSendMail.To = to_email
ObjSendMail.Subject = subject
ObjSendMail.From = from_email
'ObjSendMail.TextBody = mensaje 'tipo texto
ObjSendMail.HTMLBody = mensaje 'tipo html
ObjSendMail.TextBodyPart.Charset = "utf-8" 'support symbols á ñ ¡
ObjSendMail.Send
Set ObjSendMail = Nothing
答案 1 :(得分:0)
这对我有用。
Set iMsg = CreateObject("CDO.Message")
With iMsg
.BodyPart.Charset = "utf-8"
End With