ASP w/ CDO - generated email cut off

Here's the issue: I am using CDO to send the results of a form via HTML email. When the email is received, the HTML portion doesn't display after a certain point, so you can't read it past that point. However, if you look at the generated email, the text portion shows the full contents, and the HTML section DOES AS WELL, it just won't display. If I cut and paste into an HTML program, it views fine.

Here's the code I am using to generate the body of the email:

- - - - -
<%
       dim ITEM_ID , ITEM_NAME , STOCK_NO , PRODUCT_INQUIRY , MAINSITE_INFO , name , address , email , city , states , zip , country , phone , fax , inquiry  , page_link
      
       item_id      =      request ("item_id")
       item_name      =      request ("item_name")
       stock_no      =      request ("stock_no")              
       name      =      request ("name")       
       address      =      request ("address")
       email      =      request ("email")
       city      =      request ("city")
       states      =      request ("states")       
       zip      =      request ("zip")
       country      =      request ("SCountry")
       phone      =      request ("phone")       
       fax      =      request ("fax")       
       inquiry      =      request ("inquiry")       
                           
       page_link      =      URL_NSSL&"products/details.asp?itemid="&item_id
      
       set objConn      =      connectDB()
       set rmain      =      executeQuery ("select MAINSITE_INFO from mainsite_contact_info" , objConn)
                                                 
                                                MAINSITE_INFO      =      rmain ("MAINSITE_INFO")
                                                
                                                free(rmain)
                                                disconnect(objConn)
                         
%>
<%
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"<html><link href='"&URL_NSSL&"style/style_mainsite.css' rel='stylesheet' type='text/css'><body>"
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"<table width='100%' border='0' cellspacing='2' cellpadding='2'> "
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +" <tr> "
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"<td><img src='"&URL_NSSL&"images/logo/"&MAINSITE_LOGO&"' width='163' height='51'></td>"
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"</tr>"
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"<tr> "
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"<td><table width='100%' border='0' cellspacing='2' cellpadding='2' class='bodyText'> "
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"<tr> "
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"<td width='30%'>&nbsp;</td>"
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"<td width='70%'>&nbsp;</td>"
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"</tr>"

PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"<tr> "
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"<td class='titleOfTextAndForms'>Page Link&nbsp;</td>"
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +" <td class='bodyText'><a href='"&page_link&"' target='_blank'>"&page_link&"</a></td>"
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"</tr>"

PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"<tr> "
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"<td class='titleOfTextAndForms'>Name&nbsp;</td>"
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +" <td class='bodyText'>"&name&"</td>"
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"</tr>"

PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"<tr> "
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"<td class='titleOfTextAndForms'>Email Address&nbsp;</td>"
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +" <td class='bodyText'>"&email&"</td>"
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"</tr>"

PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"<tr> "
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"<td class='titleOfTextAndForms'>Address</td>"
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +" <td class='bodyText'>"&address&"</td>"
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"</tr>"

PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"<tr> "
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"<td class='titleOfTextAndForms'>City&nbsp;</td>"
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +" <td class='bodyText'>"&city&"</td>"
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"</tr>"

PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"<tr> "
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"<td class='titleOfTextAndForms'>State&nbsp;</td>"
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +" <td class='bodyText'>"&states&"</td>"
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"</tr>"

PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"<tr> "
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"<td class='titleOfTextAndForms'>Zip code&nbsp;</td>"
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +" <td class='bodyText'>"&zip&"</td>"
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"</tr>"

PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"<tr> "
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"<td class='titleOfTextAndForms'>Country&nbsp;</td>"
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +" <td class='bodyText'>"&country&"</td>"
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"</tr>"

PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"<tr> "
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"<td class='titleOfTextAndForms'>Phone n' Fax&nbsp;</td>"
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +" <td class='bodyText'>"&Phone&"&nbsp;&amp;&nbsp;"&fax&"</td>"
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"</tr>"

PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"<tr> "
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"<td class='titleOfTextAndForms'>Inquiry&nbsp;</td>"
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +" <td class='bodyText'>"&IsTextAreaTextAlign(inquiry)&"</td>"
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"</tr>"
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"<tr>"
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"<td>&nbsp;</td>"
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"<td>&nbsp;</td>"
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"</tr>"
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"</table></td>"
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"</tr>"
PRODUCT_INQUIRY      =      PRODUCT_INQUIRY +"</table></body></html>"
%>

<%
      response.Write(PRODUCT_INQUIRY)
      strFrom = MAINSITE_INFO
      strTo = MAINSITE_INFO
      strSubject = "Product Inquiry (Item Name: "&item_name&" & Stock #: "&stock_no&")"
      strBody = PRODUCT_INQUIRY
      intNum = send_email(strFrom , strTo , strSubject , strBody)
%>
<%
response.Redirect(URL_NSSL&"products/product_inquiry_thankyou.asp")
%>
- - - - -


Here's the raw view of the email:
- - - - -
This is a multi-part message in MIME format.

------=_NextPart_000_0007_01C65C8D.E113C070
Content-Type: text/plain;
      charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

 
<http://www.somesite.com/shop/mainsite/images/logo/kamist_logo.g
if>       
              
Page Link
http://www.somesite.com/shop/mainsite/products/details.asp?itemi
d=69      
Name        LHerrou      
Address       MyAddress      
City        MyCity      
State        MyState
Zip code        MyZip      
Country              
Phone n' Fax        MyPhone & MyFax      
Inquiry        Testing email form, Please IGNORE - Test 5      
              

------=_NextPart_000_0007_01C65C8D.E113C070
Content-Type: text/html
Content-Transfer-Encoding: 7bit
<html><link href='http://www.somesite.com/shop/mainsite/style/style_mainsite.css' rel='stylesheet' type='text/css'><body><table width='100%' border='0' cellspacing='2' cellpadding='2'>  <tr> <td><img src='http://www.somesite.com/shop/mainsite/images/logo/kamist_logo.gif' width='163' height='51'></td></tr><tr> <td><table width='100%' border='0' cellspacing='2' cellpadding='2' class='bodyText'> <tr> <td width='30%'>&nbsp;</td><td width='70%'>&nbsp;</td></tr><tr> <td class='titleOfTextAndForms'>Page Link&nbsp;</td> <td class='bodyText'><a href='http://www.somesite.com/shop/mainsite/products/details.asp?itemid=69' target='_blank'>http://www.somesite.com/shop/mainsite/products/details.asp?itemid=69</a></td></tr><tr> <td class='titleOfTextAndForms'>Name&nbsp;</td> <td class='bodyText'>LHerrou</td></tr><tr> <td class='titleOfTextAndForms'>Address</td> <td class='bodyText'>MyAddress</td></tr><tr> <td class='titleOfTextAndForms'>City&nbsp;</td>
 <td class='bodyText'>MyCity</td></tr><tr> <td class='titleOfTextAndForms'>State&nbsp;</td> <td class='bodyText'>MyState</td></tr><tr> <td class='titleOfTextAndForms'>Zip code&nbsp;</td> <td class='bodyText'>MyZip</td></tr><tr> <td class='titleOfTextAndForms'>Country&nbsp;</td> <td class='bodyText'></td></tr><tr> <td class='titleOfTextAndForms'>Phone n' Fax&nbsp;</td> <td class='bodyText'>MyPhone&nbsp;&amp;&nbsp;MyFax</td></tr><tr> <td class='titleOfTextAndForms'>Inquiry&nbsp;</td> <td class='bodyText'>Testing email form, Please IGNORE - Test 5</td></tr><tr><td>&nbsp;</td><td>&nbsp;</td></tr></table></td></tr></table></body></html>

------=_NextPart_000_0007_01C65C8D.E113C070--
- - - - -

This one was cut off after the word "address" when viewed in email program. However, I tried removing the code to generate the address table row, and then I got cut off about halfway through the word "MyCity" - almost as if there's a limitation to the length of the string?

Thanks for your help!
LVL 38
lherrouAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Irwin SantosComputer Integration SpecialistCommented:
There is a limit to the string... finding solution for you as I came across this year's ago
0
Irwin SantosComputer Integration SpecialistCommented:
0
lherrouAuthor Commented:
That's for CDONTS, does the string limit apply when using CDO? Is there a way around it, like Append Message? Also, how come the whole contents is there in the email (both in the HTML and Txt versions), but it just won't display?
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Irwin SantosComputer Integration SpecialistCommented:
after looking at your code.. where is...
Set intNum = Server.CreateObject("CDO.Message")

or similar declared... above in the code? (not displayed that is). Just confirm that you have CDO.Message component running.

Here is an example of what I use to follow:

http://www.asp101.com/samples/viewasp.asp?file=email%5Fhtml%2Easp

One of the things that I've done was use .HTMLBody instead of .strBody as the former is a parameter in the CDO.Message.  Other than that I haven't had any problems other than the 74 character limitation.
0
Irwin SantosComputer Integration SpecialistCommented:
*** side note *** I'm sure you have the PRODUCT_INQUIRY string being built as is to make it easier for program viewing...and when you get this eventually working...remove the string combinations.  This will provide less code for the HTML browsers to interpret, thus quicker display response.
0
lherrouAuthor Commented:
irwinpks,

The shopping cart allows use of multiple mail programs, so building it this way and then passing the elements to the actual mailer. The mailer works, as I indicated - it's actually sending everything, but in the output, the email only displays a certain portion of what's there.
0
Irwin SantosComputer Integration SpecialistCommented:
OK,

Could you provide the following for me please...

Server OS?
Web server platform?
Mailer program (CDO.message, CDONTS, sendmail, ASPemail, etc.)?

Overall, looks like your code is correct, so if you could provide the above, I will be able to narrow down the parameters.
0
lherrouAuthor Commented:
OK, after some experimentation, I found that the problem lies in part in my email program, Pegasus mail, which evidently isn't handling the generated HTML properly. Why, and how to fix it, I still don't know, but since the main reader of these emails uses Outlook, and it works there...

0
Irwin SantosComputer Integration SpecialistCommented:
The Pegasus email client is not fully HTML compliant.  You may want to test with Outllook Express, and even a Hotmail or Yahoo account.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
lherrouAuthor Commented:
yeah, I know... I keep test Outlook and Outlook programs installed on older computers, but didn't have access to them today... there were several other minor bugs I found in the process, so it wasn't all wasted time.
0
Irwin SantosComputer Integration SpecialistCommented:
cool. thank you!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.