clippings / swiftmailer-modify
Modify the subject of all emails
1.1.0
2020-02-14 09:22 UTC
Requires
- php: ^7.1
- swiftmailer/swiftmailer: ^5.0
Requires (Dev)
- phpunit/phpunit: ^7
This package is auto-updated.
Last update: 2026-02-17 21:38:55 UTC
README
Modify all emails before sending
Installation
Install via composer
composer require clippings/swiftmailer-modify
Usage
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()); })); }
License
Copyright (c) 2015, Clippings Ltd. Developed by Ivan Kerin
Under BSD-3-Clause license, read LICENSE file.