diff options
author | Hardway Hou <[email protected]> | 2022-05-24 10:09:46 +0800 |
---|---|---|
committer | Hardway Hou <[email protected]> | 2022-05-24 10:09:46 +0800 |
commit | b91ffae29217d441445ed3931987119d33b6fa20 (patch) | |
tree | 103b10d3125e6c28af2e588e893d3a786542ec3a | |
parent | 1b3e655f89e233c27d36c8618ef37dd820c580f6 (diff) |
minor: Support html content in mailer.php
-rw-r--r-- | classes/mailer.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/classes/mailer.php b/classes/mailer.php index 60b1ce4fd..dcb22e6d6 100644 --- a/classes/mailer.php +++ b/classes/mailer.php @@ -45,7 +45,15 @@ 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))); |