Skip to content

Bcc is filtered out incorrectly. causing bcc addresses to appear as From #280

Description

@DrBearhands

Several commands use a regexp to filter out Bcc fields:

someString.replaceAll(
           RegExp('^Bcc:.*\r\n', multiLine: true),
           '',
         )

This fails when there are multiple recipients in the Bcc field, which may be spread across several lines, hence their addresses are interpreted as items for the previous field, From in my case. Since my smtp server already deleted Bcc data, this replacement has the opposite effect as desired.

I've found 4 places where this mistake was made: SmtpSendBdatMailCommand, SmtpSendBdatMailDataCommand, SmtpSendMailDataCommand, and SmtpSendMailCommand. I do not know if this list is complete, but I would suggest also DRYing up this bit of code.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions