I use java mail API in selenium automation script to verify email confirmations. The scripts will be executed by different team members. I got this error, when someone tries to run from other IP address.
Web login required: https://support.google.com/mail/answer/78754
while using "pop3" protocol and
Please log in via your web browser: https://support.google.com/mail/accounts/answer/78754 (Failure)
while using imaps protocol