- 🇨🇦Canada lambic
I've checked that I'm on the latest version and the attached patch is there, but I'm still having issues with lost style tags.
Here's my EmailBuilder code:
$email->setSubject($payload->getSubject()) ->setTo($to) ->setFrom($from) ->setReplyTo($reply) ->setBody(['#markup' => $htmlMessage]) ->setTextBody($textMessage);
I've confirmed that I see the style tags before $email->render() gets called in Mailer.php, but I'm not sure how to track it after that as getBody() fails after that point.
Note also that you can't use devel to debug this because devel also strips out style tags, so I had to do this to debug:
\Drupal::database()->insert('x')->fields(['y' => $email->getBody()['#markup']])->execute();
- 🇮🇳India kuntal_d
Hi @lambic,
I have got the same issue.
Please try to send the body like below:$body = [ "#type" => "processed_text", "#text" => $htmlMessage, "#format" => "full_html" ]; $email->setSubject($payload->getSubject()) ->setTo($to) ->setFrom($from) ->setReplyTo($reply) ->setBody($body) ->setTextBody($textMessage);