EnvelopeListener for symfony mailer that enables whitelisting of emails
composer require halloverden/symfony-mailer-email-whitelist
services:
mailer.staging.set_recipients:
class: HalloVerden\EmailWhitelist\EventListener\WhitelistEnvelopeListener
tags: ['kernel.event_subscriber']
arguments:
$sender: '%env(EMAIL_FROM_ADDRESS)%'
$recipients: '%env(json:EMAIL_DELIVERY_ADDRESSES)%'
$deliveryWhitelist: '%env(json:EMAIL_DELIVERY_WHITELIST)%'