Assign bcc for specific email types globally
Install via composer
composer require clippings/swiftmailer-observers
$mailer->registerPLugin(new ObserversPlugin([
'[email protected]' => [
'event1',
'event2',
]
]));
$headers = $message->getHeaders();
$headers->addTextHeader(ObserversPlugin::HEADER, 'event1');
// Will add '[email protected]' to bcc
$mailer->send($message);
Copyright (c) 2015, Clippings Ltd. Developed by Ivan Kerin
Under BSD-3-Clause license, read LICENSE file.