From: Kunal Mehta Date: Sat, 23 May 2015 22:42:17 +0000 (+0200) Subject: Add List-Unsubscribe header to emails X-Git-Tag: 1.31.0-rc.0~11219^2 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=b2a043f1ef63e770dff3d4f4204561e06b702dbc;p=lhc%2Fweb%2Fwiklou.git Add List-Unsubscribe header to emails Bug: T58315 Change-Id: I5fb9cc6be78338819b9766456923e59f4fdee35c --- diff --git a/includes/mail/UserMailer.php b/includes/mail/UserMailer.php index 3cabdaebd4..82646732a3 100644 --- a/includes/mail/UserMailer.php +++ b/includes/mail/UserMailer.php @@ -206,6 +206,8 @@ class UserMailer { $headers['Date'] = MWTimestamp::getLocalInstance()->format( 'r' ); $headers['Message-ID'] = self::makeMsgId(); $headers['X-Mailer'] = 'MediaWiki mailer'; + $headers['List-Unsubscribe'] = '<' . SpecialPage::getTitleFor( 'Preferences' ) + ->getFullURL( '', false, PROTO_CANONICAL ) . '>'; # Line endings need to be different on Unix and Windows due to # the bug described at http://trac.wordpress.org/ticket/2603