I have vbscript (ASP) code that sends emails using information passed into the script from a Flash component. The information is escaped using Flash's escape function so I receive the values properly and then decode them.
I can display the decoded information correctly in a web browser using UTF-8 encoding on the web page, however when I send the information via email the unicode values in the message body show the "funny" characters instead of what I expect. For example, when I look at the email sent by the script I see these three characters â€” instead of the em dash.
I've tried setting the charset for the email but it doesn't seem to have any effect.
Here's the my code:
Set objMail = Server.CreateObject("CDO.Message")
Set objBodyPart = objmail.BodyPart
objBodyPart.Charset = "UTF-8"
Set objConf = Server.CreateObject("CDO.Configuration")
Set objFields = objConf.Fields
.Item("schemas-forum won't allow urls") = 2
.Item("schemas-forum won't allow urls") = "smtphost"
.Item("schemas-forum won't allow urls") = 20
.Item("schemas-forum won't allow urls") = 25
Set .Configuration = objConf
.From = email
.To = Trim(recip)
.Subject = subject
.TextBody = txtboilerplate 'the txtboilerplate contains the unicode chars
Set objFields = Nothing
Set objConf = Nothing
Set objMail = Nothing
Is there something wrong with how I'm trying to set the charset?