From 288e736f84650ef320ecfae026d9843cd15a9595 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Wed, 17 Jan 2024 21:51:18 -0800 Subject: [PATCH] ListUnsubscribe - Ensure URL is always absolute When delivering via unit-test or cron job, the URL came out absolute. But when using web UI to "Send test", the URL was relative. It should be absolute. --- CRM/Mailing/Service/ListUnsubscribe.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Mailing/Service/ListUnsubscribe.php b/CRM/Mailing/Service/ListUnsubscribe.php index 32d9c57643..6b5fedaf03 100644 --- a/CRM/Mailing/Service/ListUnsubscribe.php +++ b/CRM/Mailing/Service/ListUnsubscribe.php @@ -53,7 +53,7 @@ class CRM_Mailing_Service_ListUnsubscribe extends \Civi\Core\Service\AutoService $listUnsubscribe[] = $params['List-Unsubscribe']; } if (array_intersect(['http', 'oneclick'], $methods)) { - $listUnsubscribe[] = '<' . Civi::url('civicrm/mailing/unsubscribe')->addQuery([ + $listUnsubscribe[] = '<' . Civi::url('civicrm/mailing/unsubscribe', 'a')->addQuery([ 'reset' => 1, 'jid' => $m[1], 'qid' => $m[2], -- 2.25.1