FAQ |
Kalender |
|
![]() |
#1 | ||
|
|||
Flitig postare
|
MailMessage mailMsg = new MailMessage();
DBTool dbt = new DBTool(); DataSet dsGetAllUsers = dbt.getAllUsers(); mailMsg.To.Add("[email protected]"); foreach (DataRow r in dsGetAllUsers.Tables[0].Rows) { mailMsg.Bcc.Add(r["email"].ToString()); } MailAddress mailAddress = new MailAddress(strSenderEmail, strSenderName); mailMsg.From = mailAddress; mailMsg.Subject = strSubject; mailMsg.Body = "<html><body>" + strBody + "</body></html>"; mailMsg.IsBodyHtml = true; SmtpClient smtpClient = new SmtpClient(); smtpClient.Send(mailMsg); Med koden ovan ersätter du [email protected] med din egna e-postadress och använder metoden BCC för att skicka en hemlig kopia till dina mottagare. |
||
![]() |
![]() |
![]() |
#2 | |||
|
||||
Flitig postare
|
Citat:
Senast redigerad av nabil_akhlaque den 2010-03-19 klockan 20:23 |
|||
![]() |
![]() |
Svara |
|
|