Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delivery-whitelist config option does not behave as documented. #5790

Closed
msteltenpool opened this issue Oct 15, 2015 · 5 comments
Closed

delivery-whitelist config option does not behave as documented. #5790

msteltenpool opened this issue Oct 15, 2015 · 5 comments
Labels
actionable Clear and specific issues ready for anyone to take them. hasPR A Pull Request has already been submitted for this issue.

Comments

@msteltenpool
Copy link

http://symfony.com/doc/current/reference/configuration/swiftmailer.html#delivery-whitelist

"If set, emails matching any of these patterns will be delivered like normal, instead of being sent to delivery_address."

This is not true, the class Swift_Plugins_RedirectingPlugin sends it to both the white listed recipient address as well as the delivery_address.

You can see that behavior in the previous mentioned class, after it adds the white listed address as recipient, it also adds the default recipient (delivery_address)l.

foreach ((array) $this->_recipient as $recipient) {
    if (!array_key_exists($recipient, $to)) {
        $message->addTo($recipient);
    }
}
@xabbuh xabbuh added the actionable Clear and specific issues ready for anyone to take them. label Oct 18, 2015
@xabbuh
Copy link
Member

xabbuh commented Oct 18, 2015

@msteltenpool Thanks for reporting this misleading description. This should indeed be changed.

@xabbuh xabbuh added the hasPR A Pull Request has already been submitted for this issue. label Nov 1, 2015
weaverryan added a commit that referenced this issue Nov 5, 2015
This PR was merged into the 2.3 branch.

Discussion
----------

Fixed whitelist delivery of swiftmailer

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | all
| Fixed tickets | #5790

Commits
-------

ae600f9 Fixed whitelist delivery of swiftmailer
@weaverryan
Copy link
Member

Great bug report - thanks for this, it's now fixed!

@ReSpawN
Copy link

ReSpawN commented Nov 13, 2017

Is this back for some reason @weaverryan? We've tried all variations we could find but it seems to be inoperative. It delivery_addresses work perfectly though.

@xabbuh
Copy link
Member

xabbuh commented Nov 13, 2017

@ReSpawN What exactly is the behaviour you observe and what did you expect instead?

@ReSpawN
Copy link

ReSpawN commented Nov 14, 2017

@xabbuh Dude, I feel so stupid. After much debugging and checking lines of code, it seems that we we're using a SwiftMailer which was supplied with Symfony 2.8. We've neglected to update it as we then needed to change hundreds of calls to SwiftMailer's Message (used to be newInstance, now anonymous constructed).

Thus, it turns out to be a deprecated buggy version. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
actionable Clear and specific issues ready for anyone to take them. hasPR A Pull Request has already been submitted for this issue.
Projects
None yet
Development

No branches or pull requests

4 participants