mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-81629 user: Set replyto and replytoname variables in contactform
This commit is contained in:
parent
1a33da6637
commit
2cd381b27b
@ -57,7 +57,16 @@ if ($form->is_cancelled()) {
|
||||
$data->notloggedinuser = (!$user);
|
||||
$message = $renderer->render_from_template('user/contact_site_support_email_body', $data);
|
||||
|
||||
if (!email_to_user(core_user::get_support_user(), $from, $subject, $message)) {
|
||||
$sendmail = email_to_user(
|
||||
user: core_user::get_support_user(),
|
||||
from: $from,
|
||||
subject: $subject,
|
||||
messagetext: $message,
|
||||
usetrueaddress: true,
|
||||
replyto: $data->email,
|
||||
replytoname: $data->name
|
||||
);
|
||||
if (!$sendmail) {
|
||||
$supportemail = $CFG->supportemail;
|
||||
$form->set_data($data);
|
||||
$templatectx = [
|
||||
|
Loading…
x
Reference in New Issue
Block a user