Skip to content

Commit

Permalink
fixup! fixup! fix: add ability to send alternet text (html and plain)
Browse files Browse the repository at this point in the history
Signed-off-by: SebastianKrupinski <[email protected]>
  • Loading branch information
SebastianKrupinski committed Dec 26, 2024
1 parent 48c6bdb commit 0f74cba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Service/MimeMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ private function buildMessagePart(?string $contentPlain, ?string $contentHtml):
if (mb_strpos($contentHtml, '<html') === false) {
$source = '<html><meta http-equiv="content-type" content="text/html; charset=UTF-8"><body>' . $contentHtml . '</body>';
} else {
$source = $contentHtml;
$source = ' ' . $contentHtml;

Check warning on line 72 in lib/Service/MimeMessage.php

View check run for this annotation

Codecov / codecov/patch

lib/Service/MimeMessage.php#L72

Added line #L72 was not covered by tests
}

$doc = new DOMDocument();
$doc->loadHTML((string)$source, LIBXML_HTML_NODEFDTD | LIBXML_HTML_NOIMPLIED);
$doc->loadHTML($source, LIBXML_HTML_NODEFDTD | LIBXML_HTML_NOIMPLIED);
// determine if content has any embedded images
$embeddedParts = [];
foreach ($doc->getElementsByTagName('img') as $id => $image) {
Expand Down

0 comments on commit 0f74cba

Please sign in to comment.