Skip to content

Commit

Permalink
Internal: Restoring $creatorEmail param in api_mail_html function - r…
Browse files Browse the repository at this point in the history
…efs BT#21613
  • Loading branch information
AngelFQC committed May 6, 2024
1 parent dab3415 commit 8183c3b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
10 changes: 9 additions & 1 deletion public/main/inc/lib/api.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -7177,7 +7177,8 @@ function api_mail_html(
$extra_headers = [],
$data_file = [],
$embeddedImage = false,
$additionalParameters = []
$additionalParameters = [],
string $sendErrorTo = null
) {
if (!api_valid_email($recipientEmail)) {
return false;
Expand All @@ -7191,6 +7192,13 @@ function api_mail_html(
!empty($extra_headers['reply_to']) ? $extra_headers['reply_to'] : []
);

if ($sendErrorTo) {
$message
->getHeaders()
->addIdHeader('Errors-To', $sendErrorTo)
;
}

// Reply to first
$replyToName = '';
$replyToEmail = '';
Expand Down
9 changes: 8 additions & 1 deletion public/main/inc/lib/usermanager.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,12 @@ public static function create_user(
$emailSubject,
$emailBody,
$sender_name,
$email_admin
$email_admin,
[],
[],
false,
[],
$creatorEmail
);

$emailBody = $tpl->render('@ChamiloCore/Mailer/Legacy/new_user_second_email_confirmation.html.twig');
Expand All @@ -482,6 +487,7 @@ public static function create_user(
null,
null,
null,
[],
$creatorEmail
);
} else {
Expand Down Expand Up @@ -514,6 +520,7 @@ public static function create_user(
null,
null,
null,
[],
$creatorEmail
);
}
Expand Down

0 comments on commit 8183c3b

Please sign in to comment.