dimanche 2 février 2020

How to use SwiftMailer plugins in laravel mailable

Here's the SwiftMailer plugin sample code, but it didn't use the laravel mailble.

$decorator = new Swift_Plugins_DecoratorPlugin($replacements);

$mailer->registerPlugin($decorator);
$message = (new Swift_Message())
  ->setSubject('Important notice for {username}')
  ->setBody(
    "Hello {username}, you requested to reset your password.\n" .
    "Please visit https://example.com/pwreset and use the reset code {resetcode} to set a new password."
  );


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire