Skip to content

Commit

Permalink
Update lib.php
Browse files Browse the repository at this point in the history
Added support for placeholder for third party recipients field
  • Loading branch information
Dyc9 authored Jan 29, 2025
1 parent 805802b commit cfa4445
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit cfa4445

Please sign in to comment.