Rogue spaces when using CDO.Message

G

Guest

I've got the same problem, on 2 different servers. One running Microsoft
Exchange, the other running a 3rd party mail system. It's highly unlikely
that this problem is in the mail server. What is common between these 2
systems is C#, and CDO.Message, so it's one of the 2 that is having this
problem.

Anyway, I wrote both web sites. They send mailings to customers. We notice
on occassion, that there will be a rogue space in a mailing. It could happen
often, but it comes to our attention when this rogue space pops up in the
middle of a URL or of an Email address that we have included in the mailing.
My code is pretty simple, I just fill in the variables for CDO.Message, and
send it.

Any ideas where I can go to try to trouble shoot this one? Any help is
greatly appreciated.
 
B

Brian Thompson

And the winner is...CDO.Message. I am using ASP ( not .NET ) on a Windows
2003 Server pushing messages to an Exchange server. Same problem. It is really
messing me up because some of the emails have links in them and the spaces are
making them invalid. If you find a solution please let me know, I will do the
same.
 
B

Brian Thompson

The random spaces appear to not be so random after all. They are occuring
every 991 characters. Once I figured this out I was able to find additional
articles on the web. Please look at
http://www.frontpagewebmaster.com/m-212454/tm.htm. It looks like all you have
to do is add Mail.BodyPart.ContentTransferEncoding = "quoted-printable" before
Mail.HTMLBody = mailStr and it should fix it. I tested it and it appears to
resolve the issue. If you are curious about the encoding types, an article
can be found at
http://msdn.microsoft.com/library/d...k3/e2k3/_cdosys_content-transfer-encoding.asp.
If you find any more glitches in this, please let me know. Thanks.
 
Joined
Jun 7, 2012
Messages
1
Reaction score
0
Brian, don't know how to thank you! I've been looking for months to a solution to this problem. My client sends about 20K emails a week to customers, and about 15% of them use aol. My formatting to the aol accounts was completely random, with inserted spaces causing big-time problems in the html.

Your suggestion cured it 100%. Saves me tons of time and aggravation. Thanks again!
 
Joined
May 8, 2019
Messages
1
Reaction score
0
I have the same problem with rogue spaces.. Now I added
Mail.BodyPart.ContentTransferEncoding = "quoted-printable"
.. but I receive this error:
"Cada parte de los cuerpos que contienen varias partes se debe codificar con 7 bits, 8 bits o en binario. " (my system is in Spanish)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top