Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CDOSYS Process timing out

Status
Not open for further replies.

lscott35020

IS-IT--Management
Apr 4, 2007
1
US
I've got an asp application that bulk emails a large number of clients by looping through a database. The database is large enough that the process 'times out' before it completes, meaning that the 'Send Email' button has to be clicked 5-6 times before all the emails are sent.

How do I keep the process active until all the emails are sent?



 
By default IIS has a set 'time out' period. Thankfully in ASP we can set our own time outs by using this:

Code:
Server.ScriptTimeout = 110

Which means this page will time out after 110 seconds. You can adjust the number accordingly. If i have a large email blast to send after each email i normally send this
Code:
	'...get emails ready to send, then...
	objMail.Subject = "Email Reminder"
	objMail.HTMLBody = strReturn
	
	If Err.Number <> 0 then
		response.write Err.Description
		Error.Clear
	Else
		objMail.Send 'no errors, send email
	End If
	Set objMail = Nothing 
	Set cdoConfig = Nothing 			
	response.write " Sent to: " & rs("email") &"<br>"
	response.flush
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top