Hi,
I used mentioned codes in a custom file (without header/footer) to send email. I received the following error message. I used suggested codes in the following post in my custom page.
https://discourse.hkvstore.com/t/how-to-load-data-from-database-into-custom-files-v2024/8911/1 code to send email:
//send email
if (!is_null($_POST['EmailAddress']) && $_POST['EmailAddress'] != ""){
//end Email
$email = new Email();
$email->load('ChangePatientPassword.php', data: [
"From" => Config("SENDER_EMAIL"), // Replace Sender
"To" => $_POST['EmailAddress'], // Replace Recipient
"Password" => $_POST['SecCode']
]);
$email->send();
Error Message:Fatal error: Uncaught Error: Call to a member function fetchTemplate() on null in C:\xampp\htdocs\telehealth\src\Email.php:70 Stack trace: #0 C:\xampp\htdocs\telehealth\savemyinformation.php(60): PHPMaker2024\TELEHEALTH\Email->load(‘ChangePatientPa…’, ‘’, Array) #1 {main} thrown in C:\xampp\htdocs\telehealth\src\Email.php on line 70Thanks