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?
It doesn't even need to be a real e-mail address, I typically use
Mailer@CompanyName.com
forTO
, andNoReply@CompanyName
forFROM
.Just don't call the Add-method on the To-property.