CDO Message Maximum Message Size

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • srkidd12
    New Member
    • Jan 2008
    • 14

    CDO Message Maximum Message Size

    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.
  • DrBunchman
    Recognized Expert Contributor
    • Jan 2008
    • 979

    #2
    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

    Comment

    • srkidd12
      New Member
      • Jan 2008
      • 14

      #3
      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.

      Comment

      • jhardman
        Recognized Expert Specialist
        • Jan 2007
        • 3405

        #4
        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

        Comment

        • srkidd12
          New Member
          • Jan 2008
          • 14

          #5
          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:
          <%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.

          Comment

          • srkidd12
            New Member
            • Jan 2008
            • 14

            #6
            Originally posted by srkidd12
            Yes. I create the message and place it in a variable and then where you write
            Code:
            <%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:
            while not rsPersons.eof
            	List = List + rsPersons("IDs")&"<br />"
            	rsPersons.movenext
            	wend
            
            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.")
            Set myMail=CreateObject("CDO.Message")
            	myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") =  2
            	myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp server"
            	myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 
            	myMail.Configuration.Fields.Update
            	myMail.Subject="CDO Message"
            	myMail.From="my email"
            	myMail.To="Their email"
            	myMail.HTMLBody=message
            	myMail.Send
            Set myMail=nothing
            Thanks.

            Comment

            • DrBunchman
              Recognized Expert Contributor
              • Jan 2008
              • 979

              #7
              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

              Comment

              • srkidd12
                New Member
                • Jan 2008
                • 14

                #8
                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.

                Comment

                • DrBunchman
                  Recognized Expert Contributor
                  • Jan 2008
                  • 979

                  #9
                  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:
                   <%
                  Response.Write("Hello")
                  Response.Flush
                  For i = 0 to 10000000
                  Next
                  Response.Write("World")
                  %>
                  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.

                  Comment

                  Working...