发送到多个电子邮件地址但仅显示一个 C#
我正在 C# 中使用 SmtpClient,我将发送到可能的 100 个电子邮件地址。我不想遍历每个邮件并向他们发送一封单独的电子邮件。
我知道可以只发送一次消息,但我不希望发件人地址的电子邮件显示数百个其他电子邮件地址,如下所示:
Bob Hope; Brain Cant; Roger Rabbit;Etc Etc
是否可以发送消息一次并确保仅显示收件人的电子邮件地址在电子邮件的发件人部分?
I am using the SmtpClient in C# and I will be sending to potentially 100s of email addresses. I don't want to have to loop through each one and send them an individual email.
I know it is possible to only send the message once but I don't want the email from address to display the 100s of other email addresses like this:
Bob Hope; Brain Cant; Roger Rabbit;Etc Etc
Is it possible to send the message once and ensure that only the recipient's email address is displayed in the from part of the email?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
听说过 BCC(密件抄送)吗? :)
如果您可以确保您的 SMTP 客户端可以将地址添加为密件抄送,那么您的问题将得到解决:)
MailMessage 类中似乎有一个密件抄送项
http://msdn.microsoft.com/en-us/library/system.net.mail.mailmessage。
http://msdn.aspx microsoft.com/en-us/library/system.net.mail.mailmessage.bcc.aspx
这是我从 MSDN 获得的示例
Ever heard of BCC (Blind Carbon Copy) ? :)
If you can make sure that your SMTP Client can add the addresses as BCC, then your problem will be solved :)
There seems to be a Blind Carbon Copy item in the MailMessage class
http://msdn.microsoft.com/en-us/library/system.net.mail.mailmessage.aspx
http://msdn.microsoft.com/en-us/library/system.net.mail.mailmessage.bcc.aspx
Here is a sample i got from MSDN
如果您使用 MailMessage 类,请使用 BCC(密件抄送)属性。
If you are using the MailMessage class, make use of the BCC (Blind Carbon Copy) property.