Response.Flush
set data = dal.users.QueryAll()
while not data.eof
' send the email
rmail("to")=data("email")
rmail("subject")="Sample subject"
rmail("body")="Sample body"
set result = runner_mail(rmail)
' if error happened print a message on the web page
if not result("mailed") then
response.write result("message") & "<br>"
response.flush
end if
data.MoveNext
wend
data.close: data=nothing
|