Questions tagged «mailmessage»


4
使用MailMessage将电子邮件发送给多个收件人?
我在SQL Server中存储了多个电子邮件收件人。当我单击网页中的发送时,它将发送电子邮件给所有收件人。我使用分隔了电子邮件;。 以下是单个收件人代码。 MailMessage Msg = new MailMessage(); MailAddress fromMail = new MailAddress(fromEmail); Msg.From = fromMail; Msg.To.Add(new MailAddress(toEmail)); if (ccEmail != "" && bccEmail != "") { Msg.CC.Add(new MailAddress(ccEmail)); Msg.Bcc.Add(new MailAddress(bccEmail)); } SmtpClient a = new SmtpClient("smtp server name"); a.Send(Msg); sreader.Dispose();
85 c#  mailmessage 

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.