By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,828 Members | 2,241 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,828 IT Pros & Developers. It's quick & easy.

CDO Message Maximum Message Size

P: 14
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.
Apr 30 '08 #1
Share this Question
Share on Google+
8 Replies


DrBunchman
Expert 100+
P: 979
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
May 1 '08 #2

P: 14
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.
May 1 '08 #3

jhardman
Expert 2.5K+
P: 3,405
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
May 2 '08 #4

P: 14
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
Expand|Select|Wrap|Line Numbers
  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.
May 5 '08 #5

P: 14
Yes. I create the message and place it in a variable and then where you write
Expand|Select|Wrap|Line Numbers
  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:

Expand|Select|Wrap|Line Numbers
  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
  18.  
Thanks.
May 5 '08 #6

DrBunchman
Expert 100+
P: 979
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
May 5 '08 #7

P: 14
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.
May 5 '08 #8

DrBunchman
Expert 100+
P: 979
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.
Expand|Select|Wrap|Line Numbers
  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.
May 6 '08 #9

Post your reply

Sign in to post your reply or Sign up for a free account.