문제

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