<% leadIDs = request.form("leadID") set objDB = OpenDatabase(false) SQL = "Update Leads set RegionalApproved = 1 where ID in (" & leadIDs & ") AND Active = 1" UpdateDB objDB, SQL SQL = "Select U.Email from Users U, Leads L where L.DistributorID = U.DistributorID AND L.ID in (" & leadIDs & ") and PrimaryContact = 1" set rsDistributors = CreateRecordset(objDB, SQL) while not rsDistributors.eof emailto = emailto & rsDistributors("Email") & "," rsDistributors.movenext wend emailto = emailto & "marketing@prominentxtranet.com" rsDistributors.close set rsDistributors = nothing objDB.close set objDB = nothing Set ObjMail = Server.CreateObject("CDO.Message") objMail.to = emailto '"mark.rozum@consolidated.com,marketing@prominent.us" objMail.from = "website@prominentxtranet.com" objMail.subject = "New Leads Uploaded" objMail.htmlbody = "NEW leads are waiting for you on the ProMinent XTRANET! Log in to view all your leads and add your notes to the “distributor notes” field. Adding notes and clicking the "update" button will let us know that you saw the lead and qualified the lead for future reference.

http://www.prominentxtranet.com" objMail.send set objMail = nothing response.redirect("../leads.asp") %>