From 3081fefaadd4f13aed3af51802bafb2189de0911 Mon Sep 17 00:00:00 2001 From: defacer Date: Fri, 4 Feb 2005 21:15:38 +0000 Subject: [PATCH] Bugfix: don't send HTML digests to people who want plain text email. --- mod/forum/lib.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mod/forum/lib.php b/mod/forum/lib.php index 4fb8bf5181d..cadc00c73bd 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -496,6 +496,11 @@ function forum_cron () { } $posthtml .= ''; + 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!");