openbuildings / swiftmailer-filter
Whitelist / Blacklist from domains or emails for email sending
Installs: 178 845
Dependents: 1
Suggesters: 2
Security: 0
Stars: 5
Watchers: 11
Forks: 1
Open Issues: 1
Requires
- php: ^7.1
Requires (Dev)
- phpunit/phpunit: ^7
- swiftmailer/swiftmailer: ^5.0.0
This package is auto-updated.
Last update: 2024-11-17 18:33:38 UTC
README
A swiftmailer plugin that allows whitelist / blacklist to which emails to perform the sends. This is useful for example when you want to allow emails only to a certain domain in testing / staging
Usage
$mailer = Swift_Mailer::newInstance(); $mailer->registerPLugin(new FilterPlugin([ new WhiteListFilter(['example.com']), new BlacklistFilter(['test4@example.com, test5@example.com']) ]));
First argument is whitelist filter, second is blacklist filter, they both allow array of emails or domain names. If you assign a domain, all emails from that domain will be whitelisted / blacklisted.
License
Copyright (c) 2015, Clippings Ltd. Developed by Ivan Kerin as part of clippings.com
Under BSD-3-Clause license, read LICENSE file.