By default Symfony notifier only uses text message for simple email like sending OTP, but you can use MessageEvent to change the email content yourself, you may get the Email object by $event->getMessage() and then manipulate.
how do i go about moving the data from [“text”:“Symfony\Component\Mime\Email”:private]=> string(112) "Please …
to
[“html”:“Symfony\Component\Mime\Email”:private]=> NULL
which is guessing is where is needs to be?
thanks i can get the text
$TextBody = $event->getMessage()->getTextBody;
if i try and set the html body,with
$event->getMessage()->getHtmlBody = $TextBody;
$event->getMessage()->getTextBody = Null;
it is still not in html
// MessageEvent
AddListener(\Symfony\Component\Mailer\Event\MessageEvent::class, function (\Symfony\Component\Mailer\Event\MessageEvent $event): void {
$event->getMessage()->html($event->getMessage()->getTextBody());
// Stop the message from being sent
//$event->reject();
});