aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2018-10-27 23:36:45 +0200
committerMarc Alexander <admin@m-a-styles.de>2018-10-27 23:36:45 +0200
commita772949162ca1f43334de88e987f1516fe19c582 (patch)
tree2790edf1d7305adab56bd6a7106908f69f27d4fc /phpBB
parent628e5fbae674488a017400eb8a22253003fa0b9a (diff)
parent101681070b85d986d435b8387e78055932555f72 (diff)
downloadforums-a772949162ca1f43334de88e987f1516fe19c582.tar
forums-a772949162ca1f43334de88e987f1516fe19c582.tar.gz
forums-a772949162ca1f43334de88e987f1516fe19c582.tar.bz2
forums-a772949162ca1f43334de88e987f1516fe19c582.tar.xz
forums-a772949162ca1f43334de88e987f1516fe19c582.zip
Merge pull request #5363 from Elsensee/ticket/14656
[ticket/14656] Add List-Unsubscribe header to emails
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/functions_messenger.php6
-rw-r--r--phpBB/language/en/email/forum_notify.txt1
-rw-r--r--phpBB/language/en/email/newtopic_notify.txt1
-rw-r--r--phpBB/language/en/email/topic_notify.txt1
4 files changed, 9 insertions, 0 deletions
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index 45195bd6bc..8723dda7ff 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -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));
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},