Classic ASP : Email Charset Problem


Well I am a PHP Programmer, and I am coding in Classic ASP for some reason. I am stuck at a place. My script need to send an email that will have Swedish Characters. I have below code, the Subject is fine however the email body shows ?? in place of all the Swedish characters. Like this: Best??llning Ovriga ??nskem??l

Please help me !

<%@Language = VBScript Codepage = 65001 %>
dim objMail 
Set objMail = Server.CreateObject("CDO.Message") 

dim smtpServer, yourEmail, yourPassword
smtpServer = ""
yourEmail = ""     
yourPassword = "my_password"
objMail.Configuration.Fields.Item("") = 2
objMail.Configuration.Fields.Item("") = smtpServer
objMail.Configuration.Fields.Item("") = 1
objMail.Configuration.Fields.Item("") = 25 
objMail.Configuration.Fields.Item("") = true
objMail.Configuration.Fields.Item("") = yourEmail
objMail.Configuration.Fields.Item("") = yourPassword
objMail.Configuration.Fields.Item("") = 60

objMail.BodyPart.Charset = "utf-8"
objMail.Subject="Beställning Ovriga önskemål"
objMail.htmlBody = "<strong>Beställning Ovriga önskemål</strong>"
objMail.htmlBodyPart.Charset = "utf-8"
objMail.from = yourEmail = ""

Someone plz help. If there is a better forum than SitePoint plz tell mobso that I ask my question there.

Where I am it’s the weekend and weekends tend to be quieter here. I haven’t touched ASP for quite a while, but are you sure “htmlBodyPart” shouldn’t be “BodyPart”?

Thanks for your reply. Well I tried all the combinations. Not sure what is wrong. Subject Line is fine, the email body is not ok.

I haven’t learned ASP, but sounds like you’re stressing.

Have you tried w3schools, stackoverflow, or just tried searching online for answers?

I would refrain from Yahoo and Quora for answers. Yahoo is filled with the most !@#$% up answers, and unless you are VERY popular, the so-called “experts” on Quora won’t answer.

Stack sites you need to be careful about asking questions, but I have found many solutions on SO just by looking for my issue. Another is like @Mittineague posted, look at MSN for solutions.

Sorry I can’t help you with your code, but hopefully it might lead you in your quest for finding forums, as you were desperately seeking.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.