Don't send email and return HTML

Created on 5 March 2025, about 1 month ago

I need to get HTML before to send email

Using this code I can build and send an email via the Email Factory :

    // Prepare the edition.
    $emailFactory = \Drupal::service('email_factory');
    $email = $emailFactory->newTypedEmail('type', 'subtype');
    $email->setSubject('Test subject');
    $email->setTo('mymail');
    $email->send();

I need to get the full html code of the email before that it sended. I tried tu use several method without success.

With this module can I get the html of the email?

Thanks for your help .

💬 Support request
Status

Active

Version

1.4

Component

Code

Created by

🇫🇷France kumkum29

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024