Add List-Unsubscribe header to emails

Bug: T58315
Change-Id: I5fb9cc6be78338819b9766456923e59f4fdee35c
This commit is contained in:
Kunal Mehta 2015-05-24 00:42:17 +02:00
parent c5c5a90114
commit b2a043f1ef

View file

@ -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