From: Tim Otten Date: Thu, 11 Jan 2024 00:13:20 +0000 (-0800) Subject: CiviMail - Add status-check for civimail_unsubscribe_methods X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=9318114e197b61f2092ccc9ec8a8b9936744baad;p=civicrm-core.git CiviMail - Add status-check for civimail_unsubscribe_methods --- diff --git a/CRM/Utils/Check/Component/Mailing.php b/CRM/Utils/Check/Component/Mailing.php new file mode 100644 index 0000000000..b7288fb8f0 --- /dev/null +++ b/CRM/Utils/Check/Component/Mailing.php @@ -0,0 +1,46 @@ +get('civimail_unsubscribe_methods'); + if (in_array('oneclick', $methods)) { + return []; + } + + // OK, all guards passed. Show message. + $message = new CRM_Utils_Check_Message( + __FUNCTION__, + '

' . ts('Beginning in 2024, some web-mail services (Google and Yahoo) will require that large mailing-lists support another unsubscribe method: "HTTP One-Click" (RFC 8058). Please review the documentation and update the settings.') . '

', + ts('CiviMail: Enable One-Click Unsubscribe'), + \Psr\Log\LogLevel::NOTICE, + 'fa-server' + ); + $message->addAction(ts('Learn more'), FALSE, 'href', ['url' => 'https://civicrm.org/redirect/unsubscribe-one-click'], 'fa-info-circle'); + $message->addAction(ts('Update settings'), FALSE, 'href', ['path' => 'civicrm/admin/mail', 'query' => 'reset=1'], 'fa-wrench'); + + return [$message]; + } + +}