Forum Moderators: open
I am currently sending out over 11,000 news letters through loop on a database. The script works fine, this, and most other, mail servers probably do not want 11,000 emails sent through it at once. So i opted to send in batches of 400-500 and then waiting 5-10mins to give the mail server time to clear, then sending another 400-500 and so on etc
This is obviously not very practical....because it is taking me a good few hours+ to do it. Is there any function i can add into my could that will delay the script.
i.e. If i set the script up to send to all whose id is between 1 and 400, then, once the loop is complete a delay function would kick in for 5 mins, then the next part of the script would run, which would be the same as the first, only to users with id between 400 and 800.
Anyone any ideas?
Regards
Webboy
On Error
Resume Next
Dim StartTime As
Single
Dim StopTime As Single
StartTime = Timer
DoEvents
'Deal with timer starting over at Midnight
If Delayseconds > 0 Then
If StartTime + Delayseconds < 86400
Then
StopTime = StartTime + Delayseconds
Else
StopTime = (StartTime - 86400) + Delayseconds
End If
End If
Do Until
Timer >= StopTime
DoEvents
Loop