Skip to content

The fluent method .To appends to the list of To Addresses #378

@johnkwaters

Description

@johnkwaters

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();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions