Mail not sending with PHPMailer over SSL using SMTP

前端 未结 5 2199
失恋的感觉
失恋的感觉 2020-12-05 16:11

I am trying to use PHPMailer to send e-mails over SMTP but so far have had no luck. I\'ve gone through a number of SO questions, PHPMailer tutorials and forum posts but stil

5条回答
  •  孤城傲影
    2020-12-05 16:58

    $mail->IsSMTP();
    $mail->Host = "smtp.gmail.com";
    $mail->SMTPAuth = true;
    $mail->SMTPSecure = "ssl";
    $mail->Username = "myemail@gmail.com";
    $mail->Password = "**********";
    $mail->Port = "465";
    

    That is a working configuration.

    try to replace what you have

提交回复
热议问题