Gmail SMTP debug: error “please log in via your we

2019-01-02 14:25发布

I'm having problems with gmail smtp server. I already read many posts here in StackOverflow about that subject.

The best post I found about test the connection is this one.

Although it is very well explained the error I'm getting I couldn't find a answer: Google SMTP just says "Please log in via your web browser and then try again". I'm completely sure that the password and the email (both in base64) are well encoded.

As you can see here, in this image:

this image,

there is just one difference I can notice: the user@gmail.com and password is sent in two steps. In the link above the guy sends both at the same time. Google didn't accepted that. But the fact is, I write auth login Y29udGF0... (user in base64, googles responds: ) 334 UGFzc3dvcmQ6 (wich means "Password: ") YzQ2MjJmNWVi.... (paste my password in base64 and hit "enter")

Then Goggle says: Please log in via your web browser and then try again. 534-5.7.14 Learn more at https://support.google.com/mail/bin/answer.py?answer=787

And, by the way, that page is 404.

And I'm going through all this problem because @MediaTemple and @DreamHost are not working with PHPMailer. I already use PHPMailer for a long time ago, in so many different hosts, using SMTP but failed with (mt) and Dreamhost. Now I'm in middle of a project that it >must< work on these two hosts.

9条回答
与风俱净
2楼-- · 2019-01-02 15:18

I know this question is already been answered but for new comers those two solutions may help:

  1. Make sure your gmail is allowing low secure apps to sign in, you can turn it on here: https://www.google.com/settings/security/lesssecureapps.
  2. Change your password.
查看更多
深知你不懂我心
3楼-- · 2019-01-02 15:20

I did this every time the problem happens:

https://accounts.google.com/DisplayUnlockCaptcha

  • problem sorted in my case!
查看更多
泛滥B
4楼-- · 2019-01-02 15:25

I also came across this problem. Google detected my Mac as a new device and blocked it. To unblock, in a web browser log in to your Google account and go to "Account Settings".

Scroll down and you'll find "Recent activities". Click just below that on "Devices".

Your device will be listed. Okay your device. SMTP started working for me after I did this and lowered the protection as mentioned above.

查看更多
登录 后发表回答