Is it possible to send and email as html with new Symfony Notifier service? How?
There's not much context to add to this simple question. Notifier class is a new service in Symfony 5 that implements sending notifications through different channels. It is currently marked as "experimental" so there's not a good documentation when it goes to specific needs.
Here you have some code sample:
$emailSubject = $this->getParameter('app.registration.email_subject_activation');
$emailContent = $this->render('email/user-activation.html.twig', ['activation_link' => $activationLink]);
$notification = (new Notification($emailSubject, ['email']))->content($emailContent);
$recipient = new Recipient($user->getEmail());
$sentMessage = $notifier->send($notification, $recipient);
The template content is seen as plain text, with html tags and all in the email.