mailer.prepareSend

Fires before the mailer processes the sending action

Parameters:

  • $view: View code as a string
  • $message: Illuminate\Mail\Message object, check Symfony\Component\Mime\Email for useful functions.
  • $data: Array

Example usage (stops the sending process):

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

Or

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

Usage

Triggers

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