View Single Post
  #1 (permalink)  
Old January 10th, 2007, 04:10 PM
BananaJim BananaJim is offline
Authorized User
 
Join Date: Oct 2006
Location: , , .
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default CDO email - character 1023 drops out!

Bizarre thing here - can you help?

I have an ASP page that builds a string and then sends it as an HTML email using the CDO object. All standard stuff. Here is code:

----------------------------------------

Set myMail=CreateObject("CDO.Message")
myMail.Subject="ONLINE LEARNING AND TESTING"
myMail.From="x@xxx.com"
myMail.To="x@xxx.com"

eText = <long string containing 1,640 characters>

myMail.HTMLBody = eText

with myMail
        .Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
        .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.xxx.com"
        .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
        .Configuration.Fields.Update
end with

myMail.Send

----------------------------------------

The email is sent successfully.

Now... when I do response.write(eText), the browser shows the text perfectly. But when the email arrives in my inbox, get this:

THE 1023rd CHARACTER IS MISSING!!!!!

This is disastrous, since in some cases this is one of the characters of important user login details contained within the email. In other cases, the 1023rd character is one of the HTML formatting characters, which means that the formatting of the HTML email becomes corrupted.

WHY is this happening? Is it a bug with the CDO object?

Please help to solve this for me... it is very urgent!

Thanks.

Jim
Reply With Quote