Merge pull request 'minor: Support html content in mailer.php' (#72) from hardway/tt-rss:master into master

Reviewed-on: https://dev.tt-rss.org/fox/tt-rss/pulls/72
This commit is contained in:
fox 2022-05-24 16:49:26 +03:00
commit 09fb2273e6
1 changed files with 8 additions and 1 deletions

View File

@ -45,7 +45,14 @@ class Mailer {
++$hooks_tried; ++$hooks_tried;
} }
$headers = [ "From: $from_combined", "Content-Type: text/plain; charset=UTF-8" ]; $headers = [ "From: $from_combined" ];
if ($message_html) {
$headers[] = "MIME-Version: 1.0";
$headers[] = "Content-Type: text/html; charset=UTF-8";
} else {
$headers[] = "Content-Type: text/plain; charset=UTF-8";
}
$rc = mail($to_combined, $subject, $message, implode("\r\n", array_merge($headers, $additional_headers))); $rc = mail($to_combined, $subject, $message, implode("\r\n", array_merge($headers, $additional_headers)));