Sending email using smtpclient class

  • Thread starter Thread starter Jeff Williams
  • Start date Start date
J

Jeff Williams

I can send emails using the smtpclient class but I would like to do the
following:

1. Send the emails to a bulk lot of clients and use no To address only a
BCC address

2. use the To or Cc to send many email addresses.

How can I do the above. A small code sample would be appreciated.

Thanks
Jeff
 
Jeff said:
I can send emails using the smtpclient class but I would like to do the
following:

1. Send the emails to a bulk lot of clients and use no To address only a
BCC address

2. use the To or Cc to send many email addresses.

How can I do the above. A small code sample would be appreciated.

Both CC, Bcc and To properties are collections that you can add
multiple recipients to.

Arne
 
Jeff,

The MailMessage class has a property, Bcc, which exposes a
MailAddressCollection which you can add the addresses you want to send the
email to in the Bcc field. There is also a To property, as well as a Cc
property which you can use for those fields as well.
 
Back
Top