mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
Merge pull request #5363 from Elsensee/ticket/14656
[ticket/14656] Add List-Unsubscribe header to emails
This commit is contained in:
@@ -373,6 +373,12 @@ class messenger
|
||||
$this->subject = (($this->subject != '') ? $this->subject : $user->lang['NO_EMAIL_SUBJECT']);
|
||||
}
|
||||
|
||||
if (preg_match('#^(List-Unsubscribe:(.*?))$#m', $this->msg, $match))
|
||||
{
|
||||
$this->extra_headers[] = $match[1];
|
||||
$drop_header .= '[\r\n]*?' . preg_quote($match[1], '#');
|
||||
}
|
||||
|
||||
if ($drop_header)
|
||||
{
|
||||
$this->msg = trim(preg_replace('#' . $drop_header . '#s', '', $this->msg));
|
||||
|
Reference in New Issue
Block a user