Search code examples
c#emailsmtpbcc

Sending Mail via SMTP in C# using BCC without TO


I am trying to use the System.Net.Mail.MailMessage class in C# to create an email that is sent to a list of email addresses all via BCC. I do not want to include a TO address, but it seems that I must because I get an exception if I use an empty string for the TO address in the MailMessage constructor. The error states:

ArgumentException
The parameter 'addresses' cannot be an empty string.
Parameter name: addresses

Surely it is possible to send an email using only BCC as this is not a limitation of SMTP.

Is there a way around this?


Solution

  • I think if you comment out the whole emailMessage.To.Add(sendTo); line , it will send the email with To field empty.