How to connect to a database and to send a mail to addresses specified in a table.
'database connection
Set objConn = Server.CreateObject("ADODB.Connection")
objRS = "dsn=Database_Nominativi"
objConn.Open objRS
Set RSEmail=objConn.Execute("Select E-mail From Nominativi")
'read all e-mails from a table
Do While not RSEmail.eof
'send email
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.From="SENDER"
objMail.To=rsEmails("EmailAddress") 'the mail read from the database
objMail.Subject="SUBJECT"
objMail.Body="TEXT"
objMail.importance=0
objMail.Send
Set objMail = nothing
rsEmail.movenext
loop
set rsEmail = nothing
objConn.close
Set objConn = nothing