mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-29 06:38:52 +00:00
[ticket/14656] Add List-Unsubscribe header to emails
PHPBB3-14656
This commit is contained in:
parent
bb20a88748
commit
101681070b
4 changed files with 9 additions and 0 deletions
|
@ -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));
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: Forum post notification - "{FORUM_NAME}"
|
||||
List-Unsubscribe: <{U_STOP_WATCHING_FORUM}>
|
||||
|
||||
Hello {USERNAME},
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: New topic notification - "{FORUM_NAME}"
|
||||
List-Unsubscribe: <{U_STOP_WATCHING_FORUM}>
|
||||
|
||||
Hello {USERNAME},
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: Topic reply notification - "{TOPIC_TITLE}"
|
||||
List-Unsubscribe: <{U_STOP_WATCHING_TOPIC}>
|
||||
|
||||
Hello {USERNAME},
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue