This project has moved and is read-only. For the latest updates, please go here.

Sending MailMessage with To Recipient having a DisplayName Generates Erroneous Bcc


When I use a simple SmtpClient() client with a To MailAddress that contains a DisplayName, the email address, sans DisplayName, is duplicated as a Bcc. If, however, the To recipient MailAddress does not contain the Bcc.

Simplest reproduction scenario that works I can reproduce this with is:

var client = new SmtpClient();

var message = new MailMessage { From = new MailAddress("", "Alex") };
message.To.Add(new MailAddress("", "Chris") };
message.Subject = "Test Message";
message.Body = "Hey there!";


If I set my <mailSettings> to the loopback on port 25 and use Papercut, it shows up with a Bcc included, that will show "". However, if I point it to a live SMTP server or try it with smtp4dev, there is no Bcc in the headers.

Interestingly, it appears to only be the To address that this happens for. If I do not include a DisplayName, the duplication goes away. However, trying it with my ISP host, my hosting provider, or other fake servers, it consistently behaves as expected, with or without a DisplayName. Inspecting the MailMessage at the point of sending, I can confirm that there are no Bcc recipients.