FluentEmail icon indicating copy to clipboard operation
FluentEmail copied to clipboard

"To" is required when sending to Undisclosed Recipients

Open Cronkan opened this issue 6 years ago • 3 comments

I want to send to only BCC (Undisclosed Recipients) where i dont want to specify a To-address.

.To(" ") Unhandled Exception: System.FormatException: The specified string is not in the form required for an e-mail address. Parameter name: address

.To("") Unhandled Exception: System.ArgumentException: The parameter 'address' cannot be an empty string Parameter name: address

No .To() at all: Unhandled Exception: System.ArgumentNullException: Value cannot be null. Parameter name: address

Example:

                var mail = _email.Subject(email.Subject).Body(email.Body);
                if (email.To != null)
                    mail = mail.To(email.To);
                if (email.Cc != null)
                    mail = mail.CC(email.To);
                if (email.Bcc != null)
                    mail = mail.BCC(email.To);
                if (email.Attachment != null)
                    mail = mail.Attach(email.Attachment);

                await mail.SendAsync();```

Cronkan avatar Mar 21 '19 12:03 Cronkan

I think this should be supported too. However, I guess normally if you want your recipients to not know about each other, you could just send them a separate email. It's not too hard since it's automated, while sending only using BCC is more of a human to human thing.

aahventures avatar Aug 30 '19 14:08 aahventures

Which sender are you getting this problem with?

matt-goldman avatar Jun 15 '20 21:06 matt-goldman

@matt-goldman I was using the sendgrid sender

aahventures avatar Jun 18 '20 04:06 aahventures