Welcome to WebmasterWorld Guest from 54.204.74.171

Forum Moderators: ocean10000

Message Too Old, No Replies

cdo.message

How do I work around the limitations?

   
2:59 am on Apr 27, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The cdo.message object seems like its limited to only allow 2k worth of data in an email... I need to send html reports that are 2-3 times that size.

When I set this property...
cdoMailMessage.HTMLBody = sFormattedMailContents

My html gets lopped off right at 1.8k. Anyone else have this problem? Was there a workaround?

3:41 pm on May 3, 2006 (gmt 0)

10+ Year Member



Easy_Coder,
Are these reports also stored on the server? If so, you could try this property.

objMsg.CreateMHTMLBody("mymessage.htm")

Here's a link that talks about it in detail. Create MHTML Body Method [interlacken.com]

If not, I haven't experienced the problem you are having, but I did read that if you are using textbody, then there is a limitation.

4:21 pm on May 3, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No they're built on the fly from database results when a scheduled task kicks off.
5:59 am on May 4, 2006 (gmt 0)

10+ Year Member



Easy_Coder,

Thank you for bringing this up. Very interesting reading about this issue. Learn something every day because of this place :)

I had an issue with this a long ways back and eventually gave up trying to insert the contents into the body of the email, instead programmatically attaching a file of the text and sending it off that way.

Apparently, there is ~1k limit on each line of the message body, so if you just put in a few well placed Carriage Return Line Feeds(every < 1k), that should fix your problem.. the limit for the body is set at the mail server, and most are > 5MB.

HTH,

Mark

1:01 pm on May 5, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



emsaw... thanks for sharing the knowledge. I'll try that suggestion!