سؤال

I want to send a single mail to number of users. I have extracted the email addresses of all those in datatable, now I am wondering how can I pass this datatable to BCC or CC in mail.

هل كانت مفيدة؟

المحلول

You achieve it by doing something like this

MailMessage MyMail = new MailMessage();
 MyMail.From = "some email address";


foreach(DataRow row in dataTable1.Rows)
{
 MyMail.To += row["email"] + ";"
}
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top