Forum Moderators: open

Message Too Old, No Replies

Sending email from asp.net page to addresses in database

         

fhirzall

1:42 am on Apr 25, 2006 (gmt 0)

10+ Year Member



Hey everyone, I'm working on a project in asp.net with C#, and I'm trying to have a adminstator page in which the website owner can send a newsletter to people subscribed. How can I retrieve the email addresses from the database table and assign them to the objMail.To variable for sending?

Thanks in advance for the help.

txbakers

1:59 am on Apr 25, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



select email from table

while not RS.EOF{

populate mail object with email from db.

RS.MoveNext(); }

Just set up a loop until EOF of the email addresses.

You'll need to do it individually.

fhirzall

3:09 am on Apr 25, 2006 (gmt 0)

10+ Year Member



Thanks for your help txbakers, so there's no way to maybe load the emails from the db into a dataset and bind that to the mail object?