The standard approach to send an email using C# is SMTP (Simple Mail Transfer Protocol). It is a network protocol used to send emails over the internet.
Submission of Mail: After composing an email, the mail client then submits the completed e-mail to the SMTP server by using SMTP on TCP port 25. Delivery of Mail: E-mail addresses contain two parts: username of the recipient and domain name.
The SmtpClient type is obsolete on some platforms and not recommended on others; for more information, see the Remarks section.
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?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With