Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 18th, 2006, 02:27 PM
Friend of Wrox
 
Join Date: Dec 2006
Posts: 104
Thanks: 9
Thanked 1 Time in 1 Post
Default CreateMHTMLBody issues

I'm currently having issues with my "written by a six year old" asp code.
I have successfully got CDO CreateMHTMLBody to work but the email body does not correctly display the HTML body eg tables, font types ect from the associated page.

I have exhausted my google searches but no reference to layout issues.

It does not seem to matter how simple the page is, i just get the txt of the page and that's it.

Any thoughts or dry humour would be superb!

(Later input from relived coder!) Scrap above query...

Turns out it was the mail client .. have published to main web server and works fine .. Once again i blame Microsoft!

Just to add the best site i found during my long search for how to correctly use CDO mail was

http://www.interlacken.com/winnt/tip...ow.aspx?tip=46

I hope this helps as much as it did for me :)

Cheers
 
Old December 18th, 2006, 05:46 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

written by a six year old, great stuff...

FYI There is a mail method called CDOSYS I believe this is the best, and reccomended mail option.

Wind is your friend
Matt
 
Old December 18th, 2006, 11:23 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

For as much as I love to blame M$ for my hardships and problems 9 times out of 10 when something doesnt work right its our (programmers) fault, not Microsoft.

Though I do blame them for not providing decent built in support to upload files with .NET 1.1 >< I now have a new found hatred for httpHanlders =]

And yes written by a six year old, thats great stuff ^^

-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.

^^Thats my signature
 
Old January 8th, 2007, 08:26 PM
Friend of Wrox
 
Join Date: Dec 2006
Posts: 104
Thanks: 9
Thanked 1 Time in 1 Post
Default

Thanks for the replies,

Since increasing the amount of data using the method

objMsg.CreateMHTMLBody("formatmsg.asp" & _
     "?name=" & Server.URLEncode(request("txtName")) & _
     "&addr=" & Server.UrlEncode(request("txtAddr")))

Using the method

<%=request("txtName")%>

For the input fields i have found issues with CDO.Message function to send the mail. The page i am using for the body content includes some tables displaying a results table.

The issue arrives when i am trying to post a fairly long line of txt using the above method. As far as my simpleton brain is willing to fathom the objMsg.CreateMHTMLBody function posts the entire line of data in a single string.

I don't know if there is a finite restriction on either the total amount of data you can input into the template page or if there is a way to break down the input data into smaller chunks.

eg using objMsg.CreateMHTMLBody twice in the same mail function.

(Bless .. I tried but the second objMsg.CreateMHTMLBody was the only page inputted into the body of the email.)

So i agree completly with comment "9 times out of 10 when something doesnt work right its our (programmers) fault, not Microsoft."

And hopefully have proven my grasp of asp is pre " Seven Year Old" as mentioned before.

The mailing method is using CDOSYS and i agree, when it works it rocks! Just my code which is the issue :) .

If anyone has any thoughts on my small dilema please educate.





Similar Threads
Thread Thread Starter Forum Replies Last Post
connection string issues, web.config file issues kaliaparijat ASP.NET 2.0 Professional 1 June 12th, 2008 08:07 AM
IE Issues iPagan BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 3 April 1st, 2007 04:11 AM
Still Having Issues slas7713 BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 9 October 27th, 2006 02:59 PM
CHR(13) errors in CDO.CreateMHTMLBody() janaka44 Classic ASP Professional 0 April 5th, 2006 11:08 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.