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 | |
| 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')
| -rw-r--r-- | phpBB/includes/functions_messenger.php | 6 | ||||
| -rw-r--r-- | phpBB/language/en/email/forum_notify.txt | 1 | ||||
| -rw-r--r-- | phpBB/language/en/email/newtopic_notify.txt | 1 | ||||
| -rw-r--r-- | phpBB/language/en/email/topic_notify.txt | 1 |
4 files changed, 9 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)); diff --git a/phpBB/language/en/email/forum_notify.txt b/phpBB/language/en/email/forum_notify.txt index ccae82c862..1dfe8c652d 100644 --- a/phpBB/language/en/email/forum_notify.txt +++ b/phpBB/language/en/email/forum_notify.txt @@ -1,4 +1,5 @@ Subject: Forum post notification - "{FORUM_NAME}" +List-Unsubscribe: <{U_STOP_WATCHING_FORUM}> Hello {USERNAME}, diff --git a/phpBB/language/en/email/newtopic_notify.txt b/phpBB/language/en/email/newtopic_notify.txt index 12e0bb8393..0dfc9e43b4 100644 --- a/phpBB/language/en/email/newtopic_notify.txt +++ b/phpBB/language/en/email/newtopic_notify.txt @@ -1,4 +1,5 @@ Subject: New topic notification - "{FORUM_NAME}" +List-Unsubscribe: <{U_STOP_WATCHING_FORUM}> Hello {USERNAME}, diff --git a/phpBB/language/en/email/topic_notify.txt b/phpBB/language/en/email/topic_notify.txt index 20b86ee729..92bf85806e 100644 --- a/phpBB/language/en/email/topic_notify.txt +++ b/phpBB/language/en/email/topic_notify.txt @@ -1,4 +1,5 @@ Subject: Topic reply notification - "{TOPIC_TITLE}" +List-Unsubscribe: <{U_STOP_WATCHING_TOPIC}> Hello {USERNAME}, |
