diff --git a/build/index.php b/build/index.php index 930b11f..2a87cb0 100644 --- a/build/index.php +++ b/build/index.php @@ -987,7 +987,7 @@ function email_user($username, $subject, $body) foreach($headers as $header => $value) $compiled_headers .= "$header: $value\r\n"; - mail($settings->users->{$username->emailAddress}, $subject, $body, $compiled_headers, "-t"); + mail($settings->users->{$username}->emailAddress, $subject, $body, $compiled_headers, "-t"); return true; } /** diff --git a/core.php b/core.php index f77fa20..58aa336 100644 --- a/core.php +++ b/core.php @@ -642,7 +642,7 @@ function email_user($username, $subject, $body) foreach($headers as $header => $value) $compiled_headers .= "$header: $value\r\n"; - mail($settings->users->{$username->emailAddress}, $subject, $body, $compiled_headers, "-t"); + mail($settings->users->{$username}->emailAddress, $subject, $body, $compiled_headers, "-t"); return true; } /**