Attempt to assign property "Recipient" on null

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
measan
User
Posts: 33

Attempt to assign property "Recipient" on null

Post 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 ?


mobhar
User
Posts: 11727

Post by mobhar »

It should be $email instead of $Email.


measan
User
Posts: 33

Post by measan »

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


Post Reply