clippings/swiftmailer-modify

Modify the subject of all emails

1.1.0 2020-02-14 09:22 UTC

README

Build Status Scrutinizer Code Quality Code Coverage Latest Stable Version

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.