Hi there, I need your help.
This is the script for send email to subscribers in my mailing list.
I don't have ASP error but the Count variable does not increment for each send email.
The variable Count is always 625 value.
Why?
Can you help me?
Thank you in advance, I hope your help.
Code:Function JSRedirect(Byval seconds) With Response .Write("<script language=""JavaScript"">" & vbCrLf) .Write("<!--" & vbCrLf) .Write("function redirect() {" & vbCrLf) .Write("window.location = '" & url & "';" & vbCrLf) .Write("}" & vbCrLf) .Write("timer = setTimeout('redirect()', '" & (seconds * 1500) & "');" & vbCrLf) .Write("-->" & vbCrLf) .Write("</script>" & vbCrLf) End With End Function SQL = " SELECT A.*, B.emails " SQL = SQL & " FROM tbl_login A " SQL = SQL & " JOIN tbl_ml B ON A.email = B.emails " SQL = SQL & " WHERE 1 " SQL = SQL & " AND `SendEmail` = 0 " SQL = SQL & " ORDER BY ID DESC " SQL = SQL & " LIMIT 25 " Set objRS = Server.CreateObject("ADODB.Recordset") objRS.Open SQL, objconn if objRS.eof then response.redirect("go.asp") else Count = 0 while not objRS.eof //.... script ASP CDOSYS for send emails str_update = "UPDATE tbl_ml SET " str_update = str_update & " `SendEmail` = 1 " str_update = str_update & " WHERE id = " & objRS("Id") objconn.execute (str_update) Count = Count + 25 objRS.movenext wend response.write (JSRedirect(30)) response.write "email sent: " & Count & " " end if objRS.Close Set objRS = Nothing



Reply With Quote

Bookmarks