From 379a42cb26cf86e9fdec0826f76bafd38509e838 Mon Sep 17 00:00:00 2001
From: defacer <defacer>
Date: Fri, 4 Feb 2005 21:13:28 +0000
Subject: [PATCH] Bugfix: don't send HTML digests to users who want simple text
 mail.

---
 mod/forum/lib.php | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/mod/forum/lib.php b/mod/forum/lib.php
index f4811183cc..bc0bb8904f 100644
--- a/mod/forum/lib.php
+++ b/mod/forum/lib.php
@@ -541,6 +541,11 @@ function forum_cron () {
                 }
                 $posthtml .= '</body>';
 
+                if($userto->mailformat != 1) {
+                    // This user DOESN'T want to receive HTML
+                    $posthtml = '';
+                }
+
                 if (!$mailresult =  email_to_user($userto, $site->shortname, $postsubject, $posttext, $posthtml,
                                                   '', '', $CFG->forum_replytouser)) {
                     mtrace("ERROR!");
-- 
2.39.5