mailer.beforeAddContent

Fires before the mailer adds content to the message

Example usage (stops the content adding process):

Event::listen('mailer.beforeAddContent', function ((\Winter\Storm\Mail\Mailer) $mailerInstance, (\Illuminate\Mail\Message) $message, (string) $view, (array) $data, (string) $raw, (string) $plain) {
    return false;
});

Or

$mailerInstance->bindEvent('mailer.beforeAddContent', function ((\Illuminate\Mail\Message) $message, (string) $view, (array) $data, (string) $raw, (string) $plain) {
    return false;
});

Usage

Globally

use Event;

Event::listen('mailer.beforeAddContent', function () {
    // Your event listener code goes here...
});

Triggers

Class or file Line
Winter\Storm\Mail\Mailer 222
Copyright © 2024 Winter CMS