diff options
author | fox <[email protected]> | 2022-05-24 16:49:26 +0300 |
---|---|---|
committer | fox <[email protected]> | 2022-05-24 16:49:26 +0300 |
commit | 09fb2273e6c36721a9b8cc25c97d5820ceb4ec82 (patch) | |
tree | 5b04ea8c243c51d116f872e4761b98c6e4f18c08 /classes | |
parent | 1b3e655f89e233c27d36c8618ef37dd820c580f6 (diff) | |
parent | 9e557501fae6f67f4dbd5cc121e1f45e5211c9a7 (diff) |
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
Diffstat (limited to 'classes')
-rw-r--r-- | classes/mailer.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/classes/mailer.php b/classes/mailer.php index 60b1ce4fd..a15c8546b 100644 --- a/classes/mailer.php +++ b/classes/mailer.php @@ -45,7 +45,14 @@ class Mailer { ++$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))); |