?
Solved

£ being prefixed with  in email messages sent using CDO

Posted on 2012-04-02
3
Medium Priority
?
535 Views
Last Modified: 2012-06-27
Hello,

I recently did a Windows 2003 Server update and since then, plain text emails sent from my website using CDOSYS prefix £ signs with Â, e.g. £

Furthermore, prior to the Windows update, plain text emails from my website were sent using a fixed pitch font (Courier or Courier New maybe). However, they are now sent using a variable font causing email content to be misaligned.

So, in summary...

1. I want to remove the £ and only display £
2. I want to send the email using a fixed pitch font.

Here is the ASP code I currently use to send the email...

Set myMail=CreateObject("CDO.Message")
myMail.From="xyz.abc.com"
myMail.To=varEmail
myMail.Subject="blah de blah"
myMail.TextBody=msgBody
myMail.Send
set myMail=nothing

Please note, I have tried adding the following line but it made no difference (i.e. £ remained in the emails)...

myMail.bodypart.charset = "utf-8"

I hope someone can help!

Regards,

Mark.
0
Comment
Question by:funasset
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 22

Expert Comment

by:Kim Walker
ID: 37795653
There are no fonts in plain text emails, only characters. The font used to display plain text emails is set in the preferences of the email reader application.

It would help to see the contents of msgBody.
0
 
LVL 21

Accepted Solution

by:
Dale Burrell earned 2000 total points
ID: 37795666
The problem with the pound sign if that you are using the wrong codepage. The data is stored in unicode, but you're codepage is set to windows-1252 or similar. Probably you've been using the server defaults and they've changed with the upgrade. http://www.w3schools.com/asp/prop_codepage.asp. This may well be causing your other problem e.g. additional spaces or similar because as xmediaman points out with plain text no font information is sent.
0
 

Author Closing Comment

by:funasset
ID: 37795691
I set the codepage to 65001 and all is now well.

Thank you for your swift response.
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question