diff options
author | Oliver Schramm <oliver.schramm97@gmail.com> | 2018-09-16 12:28:34 +0200 |
---|---|---|
committer | Oliver Schramm <oliver.schramm97@gmail.com> | 2018-09-16 12:28:34 +0200 |
commit | 101681070b85d986d435b8387e78055932555f72 (patch) | |
tree | b8062f233bfa6b0d3dcc4917f9191a22da2a7a16 /phpBB/includes/functions_messenger.php | |
parent | bb20a88748d63502e47de4a3a8fb4b2e6653ac92 (diff) | |
download | forums-101681070b85d986d435b8387e78055932555f72.tar forums-101681070b85d986d435b8387e78055932555f72.tar.gz forums-101681070b85d986d435b8387e78055932555f72.tar.bz2 forums-101681070b85d986d435b8387e78055932555f72.tar.xz forums-101681070b85d986d435b8387e78055932555f72.zip |
[ticket/14656] Add List-Unsubscribe header to emails
PHPBB3-14656
Diffstat (limited to 'phpBB/includes/functions_messenger.php')
-rw-r--r-- | phpBB/includes/functions_messenger.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php index a85a3b67c5..54f2d5b4e4 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -369,6 +369,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)); |