Reputation: 207
We're currently changing our mail delivery system to use solely UTF-8
.
There seems to be a problem with the sender name, when the email contains non ASCII chars (hebrew) the subject & body render ok, but the sender name, as it appears in my gmail account, becomes - ??????
.
There is a line of code:
myMail.BodyPart.Charset = "UTF-8"
So I thought there should be some code of the like:
myMail.SenderName.Charset = "UTF-8"
But I can't seem to find the right code to use, assuming this would do the trick.
Upvotes: 4
Views: 12125
Reputation: 2580
This worked for me.
Set iMsg = CreateObject("CDO.Message")
With iMsg
.BodyPart.Charset = "utf-8"
End With
Upvotes: 1
Reputation: 2046
This works for me: 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
Upvotes: 1