Login or Sign up Help | Site Map
Connecting Tech Pros Worldwide

CDO Message Maximum Message Size

Question posted by: srkidd12 (Newbie) on April 30th, 2008 07:12 PM
Does anyone know how to increase the maximum size of a CDO Message sent by as ASP page? The maximum I've seen is 10KB. Thanks.
Would you like to answer this question?
Sign up for a free account, or Login (if you're already a member).
DrBunchman's Avatar
DrBunchman
Moderator
705 Posts
May 1st, 2008
09:39 AM
#2

Re: CDO Message Maximum Message Size
Do you mean the size of the message body itself or the body plus any attachments?

Have you tried changing the settings on the smtp server itself?

Dr B

Reply
srkidd12's Avatar
srkidd12
Newbie
9 Posts
May 1st, 2008
11:43 AM
#3

Re: CDO Message Maximum Message Size
I mean the length of the message and the size of the file itself when it reachs your inbox. I am trying to dynamically create the message, but it continues to get cut off at 10KB in size.

I do not have control of the smtp server, but was told that the maximum size of an email going across our network is 6mb. I'm nowhere near that.

Any other suggestions?

Thank you again for assisting me.

Reply
jhardman's Avatar
jhardman
Moderator
2,086 Posts
May 2nd, 2008
05:54 PM
#4

Re: CDO Message Maximum Message Size
Quote:
Originally Posted by srkidd12
I mean the length of the message and the size of the file itself when it reachs your inbox. I am trying to dynamically create the message, but it continues to get cut off at 10KB in size.

I do not have control of the smtp server, but was told that the maximum size of an email going across our network is 6mb. I'm nowhere near that.

Any other suggestions?

Thank you again for assisting me.

Is there any way you can completely create and save the file before you open the cdosys object?

Jared

Reply
srkidd12's Avatar
srkidd12
Newbie
9 Posts
May 5th, 2008
12:26 PM
#5

Re: CDO Message Maximum Message Size
Quote:
Originally Posted by jhardman
Is there any way you can completely create and save the file before you open the cdosys object?

Jared


Yes. I create the message and place it in a variable and then where you write
Code: ( text )
  1. <%myMail.HTMLBody=message%>
Message is a variable that holds the entire message, but it still drops part of the message.

I did some playing with it Friday and discovered that you have only so much room horizontally and vertically to work with. I'm going to try and place the list of IDs in a table and see if that works. I will update you as soon as I find out.

Thanks again.

Reply
srkidd12's Avatar
srkidd12
Newbie
9 Posts
May 5th, 2008
02:26 PM
#6

Re: CDO Message Maximum Message Size
Quote:
Originally Posted by srkidd12
Yes. I create the message and place it in a variable and then where you write
Code: ( text )
  1. <%myMail.HTMLBody=message%>
Message is a variable that holds the entire message, but it still drops part of the message.

I did some playing with it Friday and discovered that you have only so much room horizontally and vertically to work with. I'm going to try and place the list of IDs in a table and see if that works. I will update you as soon as I find out.

Thanks again.


Ok. The idea of creating a table for the IDs did not work, so I am back to square one. Anyone have any ideas on this?

I need to find a way for the CDO message to finish inserting the text of the message before it sends the message to the user. It's not a matter of size and not a matter of a limit on the number of characters, so that just leaves increasing the amount of time that the message has to insert the text before it sends the message.

Here is the relevant code:

Code: ( text )
  1. while not rsPersons.eof
  2.     List = List + rsPersons("IDs")&"<br />"
  3.     rsPersons.movenext
  4.     wend
  5.  
  6. message = (This location has been transferred from someone to you as of "&now()&".<br /><br />There are IDs currently located there.  They are listed below.<br />"&list&" Have a good day.")
  7. Set myMail=CreateObject("CDO.Message")
  8.     myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") =  2
  9.     myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp server"
  10.     myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
  11.     myMail.Configuration.Fields.Update
  12.     myMail.Subject="CDO Message"
  13.     myMail.From="my email"
  14.     myMail.To="Their email"
  15.     myMail.HTMLBody=message
  16.     myMail.Send
  17. Set myMail=nothing


Thanks.

Reply
DrBunchman's Avatar
DrBunchman
Moderator
705 Posts
May 5th, 2008
05:26 PM
#7

Re: CDO Message Maximum Message Size
Is it cutting off the message in a constant place eg after x number of characters? I think it's probably unlikely to be an issue with the time but this is easily tested by inserting some kind of wait code inbetween setting the body property and sending the message.

Dr B

Reply
srkidd12's Avatar
srkidd12
Newbie
9 Posts
May 5th, 2008
06:55 PM
#8

Re: CDO Message Maximum Message Size
Quote:
Originally Posted by DrBunchman
Is it cutting off the message in a constant place eg after x number of characters? I think it's probably unlikely to be an issue with the time but this is easily tested by inserting some kind of wait code inbetween setting the body property and sending the message.

Dr B


No, the numerous tests that I have done have all returned various numbers of characters, so the length of the message seems not to be the issue. Could you post an example of that wait code? I've been searching for code like that, but have not found it. Thanks.

Reply
DrBunchman's Avatar
DrBunchman
Moderator
705 Posts
May 6th, 2008
08:13 AM
#9

Re: CDO Message Maximum Message Size
An easy (and crappy) way is to stick a massive loop in. Test the example below and you'll see that there's a second or so delay between "Hello" and "World" writing to the screen.
Code: ( text )
  1. <%
  2. Response.Write("Hello")
  3. Response.Flush
  4. For i = 0 to 10000000
  5. Next
  6. Response.Write("World")
  7. %>

If you want to make sure that sufficient time has elapsed then you can stick an extra zero on the end to increase the pause.

Let me know whether the problem persists.

Dr B

PS Please note that it is not good practice to use a large loop to simulate a wait/sleep - I've suggested it because it's an easy way to test your script and I wouldn't recommend using it in a live environment.

Reply
Reply
Not the answer you were looking for? Post your question . . .
178,100 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Top ASP Forum Contributors