CDO Bulk Email Help - Need to make it faster

Discussion in 'ASP General' started by Brent Patroch, Sep 16, 2004.

  1. Hello,

    Novice here, I am doing bulk emails using CDO, connection to a smtp
    server at another location. I am trying to streamline my script, or
    through it out and start over to make it faster.

    I know that I am doing something wrong and that messages should be
    sending much faster. Any help appreciated:

    Set objConfig = Server.CreateObject("CDO.Configuration")
    Set Fields = objConfig.Fields

    With Fields
    .Item(cdoSendUsingMethod)= cdoSendUsingPort
    .Item(cdoSMTPServer) = "blah.com"
    .Item(cdoSMTPServerPort) = 25
    .Item(cdoSMTPConnectionTimeout) = 10
    .Item(cdoSMTPAuthenticate) = cdoBasic
    .Item(cdoSendUserName) = ""
    .Item(cdoSendPassword) = "blah"
    .Update
    End With

    Set objMessage = Server.CreateObject("CDO.Message")
    Set objMessage.Configuration = objConfig

    ' Open database here

    objRS.Open SQLString, objConn,2,2
    I = 0
    With objMessage
    .From = "Blah Mailer <>"
    .Subject = Request.Form("Subject")
    .TextBody = Request.Form("Body")
    Do while not objRS.EOF
    .To = objRS("Name") & "<" & objRS("Email") & ">"
    .send
    objRS.MoveNext
    I = I + 1
    Loop
    End With
    objRS.Close
    objConn.Close
    Set Fields = Nothing
    Set objMessage = Nothing
    Set objConfig = Nothing


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Brent Patroch, Sep 16, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest
    Replies:
    2
    Views:
    961
    dave wanta
    Jul 11, 2003
  2. David
    Replies:
    1
    Views:
    545
    sloan
    Aug 30, 2006
  3. Jan Burse
    Replies:
    33
    Views:
    888
    Jan Burse
    Sep 26, 2011
  4. jason
    Replies:
    2
    Views:
    124
    jason
    Aug 26, 2003
  5. NetNoise
    Replies:
    6
    Views:
    390
    NetNoise
    Jan 10, 2005
Loading...

Share This Page