From cfa4445c38fe8615b895bc48eef1f27b2915dae5 Mon Sep 17 00:00:00 2001 From: Dyc9 Date: Wed, 29 Jan 2025 17:09:59 +0200 Subject: [PATCH] Update lib.php Added support for placeholder for third party recipients field --- lib.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib.php b/lib.php index bea686d..74ef180 100644 --- a/lib.php +++ b/lib.php @@ -304,9 +304,9 @@ function reengagement_email_user($reengagement, $inprogress) { $emailresult = $emailresult && $usersendresult; } - if (!empty($reengagement->thirdpartyemails)) { + if (!empty($templateddetails['thirdpartyemails'])) { // Process third-party emails. - $emails = array_map('trim', explode(',', $reengagement->thirdpartyemails)); + $emails = array_map('trim', explode(',', $templateddetails['thirdpartyemails'])); foreach ($emails as $emailaddress) { if (!validate_email($emailaddress)) { debugging('', DEBUG_ALL) && mtrace("invalid third-party email: $emailaddress - skipping send"); @@ -438,7 +438,7 @@ function reengagement_template_variables($reengagement, $inprogress, $user) { // Array to describe which fields in reengagement object should have a template replacement. $replacementfields = array('emailsubject', 'emailcontent', 'emailsubjectmanager', 'emailcontentmanager', - 'emailsubjectthirdparty', 'emailcontentthirdparty'); + 'emailsubjectthirdparty', 'emailcontentthirdparty', 'thirdpartyemails'); $results = array(); // Replace %variable% with relevant value everywhere it occurs in reengagement->field.