Welcome to WebmasterWorld Guest from 188.8.131.52
Forum Moderators: ocean10000
I have a simple email form on a french-language website. It does not use a database - it just uses cdosys to obj.message off an email to the address specified in objMessage.To
I have set the code base of the page as follows:
<% Response.Charset = "UTF-8"%>
When somebody completes the form using special characters such as é or ç or ê or é or whatever - it turns up in the sent email without difficulties..
However, the text that the email form itself creates (such as the subject line of the email or body text) doesn't want to generate these characters.
for example: in the email that the recipient receives I want to title a section of the email: "The name of the sender is": <the name entered on the form>
of course.. I want to do this in French so the actual code is:
mailtext = "Dear " & strGreetingName & "," (...extra removed) &vbcrlf& "Le nom d'Expediteur: " & str_name
The word Expediteur should have an accute accent over the 2nd e like this: "Le nom d'Expéditeur:" -
I've tried just typing it directly as: é and it shows up in the email as gobbeldy-gook (technical term).. I've tried typing it in as é - and it shows up in the email as "d'Expéditeur" .
I googled my question, but wasn't able to find an answer..
Does anybody have any ideas? Right now I've taken out the special characters entirely and just typed their 'normal' similars.. (ie: just an e instead of one with an accent) - but I would like the emails received by my client to be correctly spelled if possible
As you are trying to send a non-english text through CDOSYS,
please consider setting your cahrset to utf-8.
objEmail.BodyPart.Charset = "utf-8"
objEmail.TextBodyPart.Charset = "utf-8"
objEmail.HTMLBodyPart.Charset = "utf-8"
I had no idea that that was an option for objEmail.. none whatsoever.. and I searched all over the web for something just like that! GREAT! i'm going to go try it right now!
I've got utf-8 set all over the rest of the site.. in the asp everywhere.. but not there .. i'm excited!
Thanks for the advice!