Page 1 of 1

Attempt to assign property "Recipient" on null

Posted: Fri Mar 01, 2024 4:34 pm
by measan
// Email Sending event
function Email_Sending($email, $args)
{
        if (CurrentPageID() == "edit") {
            if ($this->activated->CurrentValue == 1){
                $Email->Recipient = $args["rsnew"]["user_email"]; 
                $Email->Subject = "Registration Info"; 
                $Email->Content .= "\nYour email and password is regsitered thanks you. ";
                error_log("Sending email function called.");
            }    
        }
 
    return true;
}

When i run the program i got an error "Attempt to assign property "Recipient" on null", Please Help me ?


Re: Attempt to assign property "Recipient" on null

Posted: Fri Mar 01, 2024 5:44 pm
by mobhar

It should be $email instead of $Email.


Re: Attempt to assign property "Recipient" on null

Posted: Fri Mar 01, 2024 9:06 pm
by measan

thanks for your help and solution, i have typo $Email. thanks you.