Modify all emails before sending
Install via composer
composer require clippings/swiftmailer-modify
This will add a "[Test]" prefix in a testing environment for every message
if ($environment === 'testing') {
$mailer->registerPLugin(new ModifyPlugin(function(Swift_Message $message) {
$message->setSubject('[Test] '.$message->getSubject());
}));
}
Copyright (c) 2015, Clippings Ltd. Developed by Ivan Kerin
Under BSD-3-Clause license, read LICENSE file.