[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.2

Maximum Body Size For CDOSYS.Message?

Asked by TheClickMaster in Active Server Pages (ASP)

Tags: cdo, size, body

I try to send an email by using CDOSYS with this code

-----------

Class EmailSender
    Private EMAIL_LIST_FILE
    Private cdoSendUsingMethod
    Private cdoSendUsingPort
    Private cdoSMTPServer
    Private cdoSMTPServerPort
    Private cdoSMTPConnectionTimeout
    Private cdoSMTPAuthenticate
    Private cdoBasic
    Private cdoSendUserName
    Private cdoSendPassword
       
    Public Sub SendMail(p_sContent)
        Dim objConfig  ' As CDO.Configuration
        Dim objMessage ' As CDO.Message
        Dim Fields
        Dim arrAddresses
        Dim n
       
        arrAddresses = GetAddresses()
       
        If IsArray(arrAddresses) Then
            ' Get a handle on the config object and it's fields
            Set objConfig = Server.CreateObject("CDO.Configuration")
            Set Fields = objConfig.Fields

            ' Set config fields we care about
            With Fields
                  .Item(cdoSendUsingMethod)       = cdoSendUsingPort
                  .Item(cdoSMTPServer)            = SMTP_SERVER
                  .Item(cdoSMTPServerPort)        = SMTP_PORT
                  .Item(cdoSMTPConnectionTimeout) = 60
                  .Item(cdoSMTPAuthenticate)      = cdoBasic
                  .Item(cdoSendUserName)          = SMTP_USER
                  .Item(cdoSendPassword)          = SMTP_PASSWORD
                  .Update
            End With

            Set objMessage = Server.CreateObject("CDO.Message")
            Set objMessage.Configuration = objConfig
                                             
            For n = 0 To UBound(arrAddresses)
                part = 0
                While part < totalparts
                    With objMessage
                          .To       = arrAddresses(n)
                          .From     = "(DO NOT REPLY) <noreply@somewhere.com>"
                          .Subject  = "Order Confirmation"
                          .HTMLBody = p_sContent
                          .Send                                                  '<----  LINE 55
                    End With
                Wend
            Next
           
            Set Fields = Nothing
            Set objMessage = Nothing
            Set objConfig = Nothing
        End If
    End Sub
   
    Private Sub Class_Initialize()
        EMAIL_LIST_FILE = "email.txt"
        cdoSendUsingMethod        = "http://schemas.microsoft.com/cdo/configuration/sendusing"
        cdoSendUsingPort          = 2
        cdoSMTPServer             = "http://schemas.microsoft.com/cdo/configuration/smtpserver"
        cdoSMTPServerPort         = "http://schemas.microsoft.com/cdo/configuration/smtpserverport"
        cdoSMTPConnectionTimeout  = "http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"
        cdoSMTPAuthenticate       = "http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"
        cdoBasic                  = 1
        cdoSendUserName           = "http://schemas.microsoft.com/cdo/configuration/sendusername"
        cdoSendPassword           = "http://schemas.microsoft.com/cdo/configuration/sendpassword"
    End Sub  

    Private Function GetAddresses()
        Dim arrResult
        Dim FSO, FileHandle
        Dim sFilePath
        Dim sLine, sFileContent
       
        sFilePath = Request.ServerVariables("APPL_PHYSICAL_PATH") & EMAIL_LIST_FILE
       
        ' Open the file
        Set FSO = Server.CreateObject("Scripting.FileSystemObject")
       
        If FSO.FileExists(sFilePath) Then
            Set FileHandle = FSO.OpenTextFile(sFilePath, 1, false, 0)

            ' Read a line
            sLine = Trim(FileHandle.readLine)
            sFileContent = sLine
            ' Read until we reach the end of the file
                 While Not(FileHandle.atEndOfStream)
                     ' read another line
                     sLine = Trim(FileHandle.readLine)
                     sFileContent = sFileContent & "," & sLine
                 Wend
                
                 ' Split the addresses into an array
                 If Len(sFileContent) > 0 Then
                     arrResult = Split(sFileContent, ",")
                 End If
             Else
                 Response.Write("Email file not found: " & EMAIL_LIST_FILE)
             End If    
             
             ' Return the array
        GetAddresses = arrResult
    End Function
End Class

---------------

The body is a html file that is generated in another script. The sending works fine most of the times but as soon as the body gets over a certain size (I think its around 10KB) the following error message is displayed:

error '80040211'
/include/Email.asp, line 55

Line 55 is the line with .Send  

-------------
So my question is, is there a maximum message size and what can I do to make it send large messages.

-TCM-
[+][-]10/05/05 12:31 PM, ID: 15024882Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/05/05 12:35 PM, ID: 15024914Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/05/05 12:36 PM, ID: 15024921Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/05/05 12:39 PM, ID: 15024955Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/05/05 12:41 PM, ID: 15024973Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/05/05 12:45 PM, ID: 15025006Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/05/05 12:52 PM, ID: 15025063Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/05/05 01:03 PM, ID: 15025162Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/05/05 01:10 PM, ID: 15025201Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/05/05 01:40 PM, ID: 15025413Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/05/05 01:41 PM, ID: 15025429Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/05/05 01:59 PM, ID: 15025600Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/05/05 07:22 PM, ID: 15027653Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Active Server Pages (ASP)
Tags: cdo, size, body
Sign Up Now!
Solution Provided By: marc_nivens
Participating Experts: 3
Solution Grade: A
 
[+][-]10/06/05 02:00 AM, ID: 15028916Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/06/05 07:48 AM, ID: 15030992Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-89