Script Sending mails with Gmail: Failed to authenticate on SMTP server

前端 未结 3 1589
清歌不尽
清歌不尽 2021-01-02 03:57

I am having some hard time getting my PHP script to send emails with a SMTP Gmail account. I am using PHP and Symfony2 SwiftMailer, but it seems that the problem lies with

3条回答
  •  执念已碎
    2021-01-02 04:35

    Maybe this helps someone: I had the same encounter with gmail, but in my case, when I logged into the gmail account that I configured in my code as SMTP mail sender user, I was greeted by a warning message saying that somebody tried to use my user and pass and that attempt was blocked (hence my error message). It asked me to confirm if that was me or not, so after I clicked the 'That was me' button and tried my code again all worked fine.

提交回复
热议问题