well i just did this...
i have a connection string stored in a seperate file.
i have 2 fields in the database...emailAddress and firstName
here is my code...
Set Mailer = Server.CreateObject("CDONTS.NewMail")
Mailer.From= "<
[email protected]>"
strTemp = "" & rs("emailAddress") & ""
Mailer.To = strTemp
'Mailer.CC = "
[email protected]"
'Mailer.BCC= "
[email protected]"
Mailer.Subject = "Newsletter"
'Mailer.MailFormat = 0
Mailer.BodyFormat = 0
mailBody = "<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.01 Transitional//EN"" ""http://www.w3.org/TR/html4/loose.dtd"">"
mailBody = mailBody & ""
mailBody = mailBody & ""
Mailer.Body = mailBody
Mailer.Send
set Mailer = nothing
rs.movenext
wend
response.write "mailing complete."
conn.close
set conn = nothing
%>
this loops through all the records in the database. i just put my newsletter content in the mailBody = mailBody & "" and then i bring up this page in the browser. when it is finished it prints "mailing complete". commented out code is either elements that aren't supported on my server or that i didn't use...
this should help...