Skip to content

Commit

Permalink
Ensure we use $CFG->emailfromvia setting (#471)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjnelson committed Mar 27, 2024
1 parent 415e392 commit 6d87165
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions classes/task/email_certificate_task.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public function execute() {
$subject = get_string('emailstudentsubject', 'customcert', $info);
$message = $textrenderer->render($renderable);
$messagehtml = $htmlrenderer->render($renderable);
email_to_user($user, fullname($userfrom), html_entity_decode($subject, ENT_COMPAT), $message,
email_to_user($user, $userfrom, html_entity_decode($subject, ENT_COMPAT), $message,
$messagehtml, $tempfile, $filename);
}

Expand All @@ -221,7 +221,7 @@ public function execute() {
$message = $textrenderer->render($renderable);
$messagehtml = $htmlrenderer->render($renderable);
foreach ($teachers as $teacher) {
email_to_user($teacher, fullname($userfrom), html_entity_decode($subject, ENT_COMPAT),
email_to_user($teacher, $userfrom, html_entity_decode($subject, ENT_COMPAT),
$message, $messagehtml, $tempfile, $filename);
}
}
Expand All @@ -241,7 +241,7 @@ public function execute() {
$emailuser = new \stdClass();
$emailuser->id = -1;
$emailuser->email = $email;
email_to_user($emailuser, fullname($userfrom), html_entity_decode($subject, ENT_COMPAT), $message,
email_to_user($emailuser, $userfrom, html_entity_decode($subject, ENT_COMPAT), $message,
$messagehtml, $tempfile, $filename);
}
}
Expand Down

0 comments on commit 6d87165

Please sign in to comment.