I work for a public school system and this newsletter is being used to notify vendors of upcoming bids.
I want to send an email, and then delay the sending of another one for 10 seconds. Is there delaytimer or waittimer code that will accomplish this?
Thank you, Sherry Hall
Here is my code:
' -- GET LIST OF PEOPLE TO EMAIL
' -- OPEN DATABASE CONNECTION
Call openDB ()
' -- SET AND EXECUTE SQL STRING
strSQL = "SELECT userid, name, email1, email2, email3 FROM yesmail"
Call createRS (objRs)
If objRs.EOF AND objRs.BOF Then
' -- CLOSE THE CONNECTION AND OBJECTS
Call closeConnRS (objRs, objConn)
' -- CREATE SESSION MESSAGE
Session ("strMessage") = "No members were found in the mailing list."
Response.Redirect "vemadmin.asp"
Else
' -- ASSIGN TO ARRAY
Call arrayGetRows ()
' -- CLOSE THE CONNECTION AND OBJECTS
'Call closeConnRS (objRs, objConn)
End If
' -- SEND BULK EMAIL TO THE LIST MEMBERS
EmailCount = 0
Email.AutoGenerateTextBody = False
Email.MimeFormatted = False
Email.CreateMHTMLBody "http://*********/admin/purchasing/vemnewsltr.asp"
Email.TextBody = "If you can see this text, you are not using an HTML enabled email client or your email client could not interpret this HTML. To view all open bids and quotes, go to ******/admin/purchasing/bidindex.asp."
' -- SEND THE BULK MAIL MESSAGE TO EACH USER IN TURN
For i = 0 to ubound (arrayData, 2)
Email.To = ""
iSend = False
Email.From = "
[email protected]"
Email.Subject = "Open Bid and Quote Announcements"
If Len(Trim(arrayData(2,i)))>0 Then
Email.To = arrayData (2,i)
EmailCount = EmailCount + 1
iSend = True
End If
If Len(Trim(arrayData(3,i)))>0 Then
Email.To = Email.To & ";" & arrayData (3,i)
EmailCount = EmailCount + 1
iSend = True
End If
If Len(Trim(arrayData(4,i)))>0 Then
Email.To= Email.To & ";" & arrayData (4,i)
EmailCount = EmailCount + 1
iSend = True
End If
If iSend = True Then
Email.send
strSQL = "INSERT INTO emailsent (userid,name,email1,email2,email3) values(" & "'" & arrayData(0,i) & "', " & "'" & arrayData(1,i) & "', " & "'" & arrayData(2,i) & "', " & "'" & arrayData(3,i) & "', " & "'" & arrayData(4,i) & "'" & ")"
objConn.Execute (strSQL)
End If
Next
Set Email = Nothing
' -- CLOSE THE CONNECTION AND OBJECTS
Call closeConnRS (objRs, objConn)
' -- HANDLE THE REDIRECTION BACK TO THE ADMIN PAGE
Session ("strMessage") = "The Email has been sent to '" & EmailCount & "' people."
Response.Redirect "vemadmin.asp"