Trying to get property 'email_from' of non-object - Hack The Tech - Latest News related to Computer and Technology

Hack The Tech - Latest News related to Computer and Technology

Get Daily Latest News related to Computer and Technology and hack the world.

Sunday, September 24, 2023

Trying to get property 'email_from' of non-object

I keep having errors while trying to send mail to a user

   $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;        
}       
$mail->Port       = $config->port;        
$mail->CharSet = 'UTF-8';        
//Recipients        
$mail->setFrom($gnl->email_from, $gnl->sitetitle);        
$mail->addAddress($receiver_email, $receiver_name);        
$mail->addReplyTo($gnl->email_from, $gnl->sitename);       
 // Content        
$mail->isHTML(true);        
$mail->Subject = $subject;

Here is were my error is

$mail->setFrom($gnl->email_from, $gnl->sitetitle);


source https://stackoverflow.com/questions/77164497/trying-to-get-property-email-from-of-non-object

No comments:

Post a Comment