473,395 Members | 2,253 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

CDO Bulk Email Help - Need to make it faster

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) = "bl**@blah.com"
.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 <bl**@blah.com>"
.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!
Jul 19 '05 #1
1 2155
What do you mean by send faster?
Is the page taking a long time or simply just the e-mail?
It may be the SMTP server. Most queue up and send every (n) sec/min..... It
may simply be a matter of sitting there waiting to go out, in which case
it's nothing to do with the code.

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Brent Patroch" <br***@patroch.com> wrote in message
news:en**************@TK2MSFTNGP11.phx.gbl...
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) = "bl**@blah.com"
.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 <bl**@blah.com>"
.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!

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Good Man | last post by:
Hi I'm building a 'job posting' site of sorts. When a job is available in a particular state, I want the system to send an email to everyone who is 'watching' that state. I know how to do...
2
by: jason | last post by:
What are the technical challenges in getting a local SMTP email server set up on a win3k system or alternatively on a win2k pro local work statation. We are on the verge of acquiring a new win3k...
2
by: Diego | last post by:
HI, I'm trying yo improve the performance of the following piece of code. Here I'm archiving Items that are done processing to Archive Tables. I believe that if I use BULK INSERTS/SELECTS/UPDATES...
2
by: Chris | last post by:
Any help would be appreciated. I am running a script that does the following in succession. 1-Drop existing database and create new database 2-Defines tables, stored procedures and functions...
7
by: iqbal | last post by:
Hi all, We have an application through which we are bulk inserting rows into a view. The definition of the view is such that it selects columns from a table on a remote server. I have added the...
6
by: pk | last post by:
Sorry for the piece-by-piece nature of this post, I moved it from a dormant group to this one and it was 3 separate posts in the other group. Anyway... I'm trying to bulk insert a text file of...
16
by: Philip Boonzaaier | last post by:
I want to be able to generate SQL statements that will go through a list of data, effectively row by row, enquire on the database if this exists in the selected table- If it exists, then the colums...
1
by: David | last post by:
Hi! I am looking to integrate a bulk emailing system into my web site. I am trying to find a web-based solution but it seems difficult to find anything relevant. There are lot of system available...
3
by: akdemirc | last post by:
i have a problem with large data import to a db in sql server.. Actually i have an application that collects data from an environment and dispatches this data to different csv files for sql server to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.