Forum Moderators: open

Message Too Old, No Replies

mailing list

         

webboy1

5:36 pm on Jan 9, 2003 (gmt 0)

10+ Year Member



Hi there,

I have written a mailing list script that, when posted to, loops through my MSSQL database and sends the form i have submitted to all the users in the database. Can anyone give me any advice on how i can determine whether it was a success or not.

A couple of times i tried it, i got a message saying "page cannot be found" half way through the sending process. It was as if the script had crashed.

Can anyone advise me with any hints or tips on how i can count how many DB entries received the newsletter? and how to make sure the script doesn't crash after 10-15 seconds?

I have used it a couple of times and it has worked, so i think it really just needs tightening up.

Any help appreciated!

Regards
Webboy

wardbekker

5:53 pm on Jan 9, 2003 (gmt 0)

10+ Year Member



webboy1,

If you use a mail component, it should return an error if there is any problem (and your script should handle this error). If the e-mail adress is bad or the mail account is full, you should get an error message to the specified 'from' mail account.

duckhunter

2:24 am on Jan 10, 2003 (gmt 0)

10+ Year Member



I was able to do just that with my SQL DB until the list got so long that I had to go to a commercial email package but I used to have to set script.timeout = 600 (or some large value) and I would always Response.Write the RecordID and email address so if it died, I could see where it left off.

Wardbekker is right about trapping the error...

On Error Resume Next
objMail.Send

If err.Number <> 0 Then
Response.write "Error Sending: " & err.number & " - " & err.description
err.clear
end if