Notification email does not send proper html
ElkArt v1.1.6 on PHP v7.3.24
Parts of my community would like to use the forum as if it were a maillist. I found out how to activate the maillist function, and users have set their notifications accordingly. They get notified when a new topic or reply is posted. So far, so good ..
I have several problems though in understanding how this is supposed to work:
1. Notifications are sent as text emails, always
After some research in the source code, I found that the Notification module ultimately calls the sendmail() function in Mail.subs.php. One of the parameters to that function is the boolean variable "$send_html", and I assume this is what should control whether html mail should be sent (is that correct?).
If that's true, the call for Notification has hard wired the parameter "$send_html" to false. I couldn't find anything in the Administrator or user settings panels to control this flag. Is there any means to send notifications as html?
2. Sent html mails are incorrect
Following my question 1, I have changed the call to sendmail() to enforce "$send_html" to true. The mails are sent out, but the result is disappointing to say the least.
- The mail is sent as a multipart message (correct)
- First part is the plain text message (correct)
- Second part is the html message (correct)
Looking at the message source code, the html part itself is wrong in many aspects though. It is only adding this tag:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
.. followed by the markdown version of the message body. No traces of html can be found anywhere. Also, html, head, and body tags are missing completely.
Any hint is highly appreciated. Please let me know if I could give more information or detail to describe the problem.