0

我在密件抄送方面遇到了一个奇怪的问题。接收邮件的收件人,但在收件人:字段中具有收件人电子邮件地址。因此,例如 bcc1@server.com 收件人在正确的邮箱中获得正确的消息,但 To: 字段而不是 to@server.com 而不是 bcc1@server.com。与 bcc2 相同。任何人都可以看到一个问题?我做错了什么?

MailAddress from = new MailAddress("from@server.com", "Ben Miller");
MailAddress to = new MailAddress("to@server.com", "Jane Clayton");
MailMessage message = new MailMessage(from, to);
message.Subject = "Test Subject.";
message.IsBodyHtml = true;
message.Body = "Some body text";
MailAddress bcc1 = new MailAddress("bcc1@server.com", "BCC1 Reciever");
message.Bcc.Add(bcc1);
MailAddress bcc2 = new MailAddress("bcc2@server.com", "BCC2 Reciever");
message.Bcc.Add(bcc2);


SmtpClient client = new SmtpClient(server);
System.Net.NetworkCredential SMTPUserInfo = new           System.Net.NetworkCredential("from@server.com", "pass");
client.UseDefaultCredentials = true;
client.Credentials = SMTPUserInfo;

client.Send(message);
4

1 回答 1

2
于 2012-07-04T00:04:22.643 回答