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:
commit
09fb2273e6
|
@ -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)));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue