📜  无法发送邮件.邮件程序错误:SMTP 连接()失败. https: github.com PHPMailer PHPMailer wiki 疑难解答 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:00.198000             🧑  作者: Mango

代码示例1
i solve it by adding this line of code:

$mail->SMTPOptions = array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
)
);

im using ssl 465..

and its really important to do this on your gmail account.
basically turned it on.
"Access for less secure apps has been turned on"