FluentEmail
FluentEmail copied to clipboard
The fluent method .To appends to the list of To Addresses
I was looping through a list of people to send emails to, using the same instance of FluentEmail and each person got all the previous peoples emails! Turns out .To APPENDS to the list of To Addresses. I thin this is a bug - the "feel" of setting to is to make To the ONLY addressee. Appending would be a method like "AddRecipient", IMO Fixed by prefixing all usages with
// .To APPENDS to the To List!
_fluentEmail.Data?.ToAddresses?.Clear();
I had same issue and spent a lot of time checking what might be problem. At the end I came up with replacing IFluentEmail with IFluentEmailFactory