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