MDL-48164 mod_forum: Add additional headers to prevent OOF replies
This adds the X-Auto-Response-Suppress header to outbound messages.
This commit is contained in:
+12
-3
@@ -735,12 +735,16 @@ function forum_cron() {
|
||||
|
||||
$userfrom->customheaders = array (
|
||||
// Headers to make emails easier to track.
|
||||
'Precedence: Bulk',
|
||||
'List-Id: "' . $cleanforumname . '" <moodleforum' . $forum->id . '@' . $hostname.'>',
|
||||
'List-Help: ' . $CFG->wwwroot . '/mod/forum/view.php?f=' . $forum->id,
|
||||
'Message-ID: ' . forum_get_email_message_id($post->id, $userto->id, $hostname),
|
||||
'X-Course-Id: ' . $course->id,
|
||||
'X-Course-Name: ' . format_string($course->fullname, true)
|
||||
'X-Course-Name: ' . format_string($course->fullname, true),
|
||||
|
||||
// Headers to help prevent auto-responders.
|
||||
'Precedence: Bulk',
|
||||
'X-Auto-Response-Suppress: All',
|
||||
'Auto-Submitted: auto-generated',
|
||||
);
|
||||
|
||||
if ($post->parent) {
|
||||
@@ -1055,7 +1059,12 @@ function forum_cron() {
|
||||
}
|
||||
}
|
||||
|
||||
$userfrom->customheaders = array ("Precedence: Bulk");
|
||||
// Headers to help prevent auto-responders.
|
||||
$userfrom->customheaders = array(
|
||||
"Precedence: Bulk",
|
||||
'X-Auto-Response-Suppress: All',
|
||||
'Auto-Submitted: auto-generated',
|
||||
);
|
||||
|
||||
$maildigest = forum_get_user_maildigest_bulk($digests, $userto, $forum->id);
|
||||
if ($maildigest == 2) {
|
||||
|
||||
Reference in New Issue
Block a user