Unable to send email using Gmail SMTP server through PHPMailer, getting error: SMTP AUTH is required for message submission on port 587. How to fix?

前端 未结 12 2271
[愿得一人]
[愿得一人] 2020-11-22 02:42

I would like to send an email using Gmail SMTP server through PHP Mailer.

this is my code



        
12条回答
  •  逝去的感伤
    2020-11-22 03:14

    Also worth noting that if you have two factor authentication enabled, you'll need to setup an application specific password to use in place of your email account's password.

    You can generate an application specific password by following these instructions: https://support.google.com/accounts/answer/185833

    Then set $mail->Password to your application specific password.

提交回复
热议问题