Add using List-Unsubscribe-Post header to PHPMailerMethod

[MAILPOET-5983]
This commit is contained in:
Jan Lysý
2024-03-27 13:17:36 +01:00
committed by Aschepikov
parent 5bcc77765c
commit fc03639aff
4 changed files with 13 additions and 13 deletions

View File

@@ -75,6 +75,7 @@ abstract class PHPMailerMethod implements MailerMethod {
}
$mailer->Sender = $this->returnPath; // phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
if (!empty($extraParams['unsubscribe_url'])) {
$this->mailer->addCustomHeader('List-Unsubscribe-Post', 'List-Unsubscribe=One-Click');
$this->mailer->addCustomHeader('List-Unsubscribe', '<' . $extraParams['unsubscribe_url'] . '>');
}