Doug,
that works great thanx doug.... I have made a control that uses a 2
ListBox contrls and allows adminds to make a selection of the users that
were in the database to a 2nd ListBox. Also Admin can select all users if
it was to be a mass mailing to a client list.
Morgan
> //cmd is a SqlCommand that gets email addresses
> SqlDataReader _r = cmd.ExecuteReader();
> System.Web.Mail.MailMessage _mm = new System.Web.Mail.MailMessage();
> _mm.From = "me@m...";
> _mm.Body = "This is my e-mail message";
> while ( _r.Read() )
> {
> _mm.To = _r["Email"];
> System.Web.Mail.SmtpMail.Send(_mm);
> }
>
> ______________________________________________
> doug seven | sr. developer | dotnetjunkies.com
>
> Learn ASP.NET - Read the books...
> Programming Data-Driven Web Applications with ASP.NET
> http://www.amazon.com/exec/obidos/ASIN/0672321068/dotnetjunkies-20/107-
10642
> 54-2553318
>
> ASP.NET: Tips, Tutorials and Code
> http://www.amazon.com/exec/obidos/ASIN/0672321432/dotnetjunkies-20/107-
10642
> 54-2553318
>
> Coming Soon!
> Professional ADO.NET
> http://www.amazon.com/exec/obidos/ASIN/186100527X/dotnetjunkies-20/
>
>
> > -----Original Message-----
> > From: mvermef@y... [mailto:mvermef@y...]
> > Sent: Sunday, October 21, 2001 3:51 AM
> > To: ASPX_Professional
> > Subject: [aspx_professional] Re: MailList using .NET Web Mail
> >
> >
> > I am not using nor would I ever user CDONTS... this is a .NET
newsgroup
> > hence I was posting about System.Web.Mail class that comes with .NET.
> > Thanx for the reply.. And by default Mail support is default in
the .NET
> > runtime as long as u include the above for mentioned assembly. I
> > wouldn't have posted if I didn't have a SMTP server at my disposal..
> >
> > Morgan