Gmail SMTP 디버그 : 오류“웹 브라우저를 통해 로그인하십시오”
Gmail SMTP 서버에 문제가 있습니다. 나는 이미 그 주제에 관한 많은 게시물을 StackOverflow에서 읽었습니다.
연결 테스트에 대해 찾은 최고의 게시물은 이것 입니다.
오류가 잘 설명되어 있지만 답변을 찾을 수 없습니다. Google SMTP는 "웹 브라우저를 통해 로그인 한 다음 다시 시도하십시오"라고 말합니다. 암호와 이메일 (base64 모두)이 잘 인코딩되어 있는지 완전히 확신합니다.
여기에서 볼 수 있듯이이 이미지에서 :
,
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.
I know this is an older issue, but I recently had the same problem and was having issues resolving it, despite attempting the DisplayUnlockCaptcha fix. This is how I got it alive.
Head over to Account Security Settings (https://www.google.com/settings/security/lesssecureapps) and enable "Access for less secure apps", this allows you to use the google smtp for clients other than the official ones.
Update
Google has been so kind as to list all the potential problems and fixes for us. Although I recommend trying the less secure apps setting. Be sure you are applying these to the correct account.
- If you've turned on 2-Step Verification for your account, you might need to enter an App password instead of your regular password.
- Sign in to your account from the web version of Gmail at https://mail.google.com. Once you’re signed in, try signing in
to the mail app again.- Visit http://www.google.com/accounts/DisplayUnlockCaptcha and sign in with your Gmail username and password. If asked, enter the
letters in the distorted picture.- Your app might not support the latest security standards. Try changing a few settings to allow less secure apps access to your account.
- Make sure your mail app isn't set to check for new email too often. If your mail app checks for new messages more than once every 10
minutes, the app’s access to your account could be blocked.
I did this every time the problem happens:
https://accounts.google.com/DisplayUnlockCaptcha
- problem sorted in my case!
I recently got this message, too, after I switched the data center location of a web application sending through Google SMTP.
The URL that apparently Google means is: https://support.google.com/mail/answer/78754. At that link, one of the steps is to reset your password. Not coincidentally, I also received an email from google with a subject of "Suspicious sign in prevented" that instructed me to change my password.
After resetting my password, I was back to using Google SMTP as usual.
I know this question is already been answered but for new comers those two solutions may help:
- 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.
- Change your password.
To send mail using Gmail SMTP, need to change your account setting. Login into your gmail accout then follow the link below to change your gmail account setting to send mail using your apps and program. https://www.google.com/settings/security/lesssecureapps
Note: This setting is not available for accounts with 2-Step Verification enabled. Such accounts require an application-specific password for less secure apps access.
There are two ways to resolve this, and only one may work, depending on how you're accessing Google.
The first method is to authorize access for your IP or client machine using the https://accounts.google.com/DisplayUnlockCaptcha link. That can resolve authentication issues on client devices, like mobile or desktop apps. I would test this first, because it results in a lower overall decrease in account security.
If the above link doesn't work, it's because the session is being initiated by an app or device that is not associated with your particular location. Examples include:
- An app that uses a remote server to retrieve data, like a web site or, in my case, other Google servers
- A company mail server fetching mail on your behalf
In all such cases you have to use the https://www.google.com/settings/security/lesssecureapps link referenced above.
TLDR; check the captcha link first, and if it doesn't work, try the other one and enable less secure apps.
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.
There are at least these two issues I have observed for this problem: 1) It could be either because your sender username or password might not be correct 2) Or it could be as answered by Avinash above, the security condition on the account. Once you try SendMail using SMTP, you normally get a notification in to your account that it may be an unauthorized attempt to access your account, if not user can follow the link to turn the settings to lessSecureApp. Once this is done and smtp SendMail is tried again, it works.
Some apps are marked as less secure by google, so you just need to give access for those app so google will allow you to access its services to you.
'IT story' 카테고리의 다른 글
System.out.println ()을 짧게 만드는 방법 (0) | 2020.07.12 |
---|---|
숫자가 두 값 사이에 있는지 확인하는 방법은 무엇입니까? (0) | 2020.07.12 |
스택과 큐의 기본 차이점은 무엇입니까? (0) | 2020.07.12 |
아이폰 키보드, UITextField 커버 (0) | 2020.07.12 |
Hive에서 테이블 파티셔닝과 버킷 팅의 차이점은 무엇입니까? (0) | 2020.07.12 |