Hi, I'm after code for emailing everyone in the email field of a database using a web form - i.e. subject and content is added using a form and all the email addresses are added from the database.
Thanks in advance
Richard
SQL = "SELECT emailfield from usertable order by emailfield"
rs.open SQL, Connection
While not rs.eof
if not rs("emailfield" <> "" then
EmailComponent.AddRecipient rs("emailfield"
end if
rs.movenext
wend
This will add all addresses in a field named email to an email component. ASPMail or JMail are two good ASP email components. You have to have them installed on your server though.
Hope that helps.
Harold Blackorby
hblackorby@scoreinteractive.com
St. Louis, MO
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.