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 2247
[愿得一人]
[愿得一人] 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:36

    If you are using cPanel you should just click the wee box that allows you to send to external servers by SMTP.

    Login to CPanel > Tweak Settings > All> "Restrict outgoing SMTP to root, exim, and mailman (FKA SMTP Tweak)"

    As answered here:

    "Password not accepted from server: 535 Incorrect authentication data" when sending with GMail and phpMailer

提交回复
热议问题