The error message that is shown is:
Authentication failed. Please check your username/password.
[Server response: 534-5.7.14 <https://accounts.google.com/ContinueSignIn?sarp=1&scc=1&plt=AKgnsbsMJ 534-5.7.14 CTtZOwFdid3ZTKA67P5RtaDoBRDQfHufdOoVjcwSkRfoSbp–tQ6wHzEg2u3chKc2oHOPi 534-5.7.14 3FIbd9gguTpN6ApPcJWOxNd1HvAxUPIbp4Lq6XvKnXrUFgJ_jow3LjqN77bfFu9q-yNqy8 534-5.7.14 qvh11ZCyaqb_JelAWCazjfJxWalf6lQGmnv8HY86uLYlzHYD7B4sMlAwarCH6ct7b_uj-W 534-5.7.14 -UkWoOg> Please log in via your web browser and then try again. 534-5.7.14 Learn more at 534 5.7.14 https://support.google.com/mail/bin/answer.py?answer=78754m5sm2472642wjx.16 – gsmtp code(534) ]
Solution:
The only solution which worked for me, is to enable Two-step verification for the account whose mail is to be retrieved, create a one time password, and use this password in the Google Apps account which will be retrieving/sending as the Google Account. Once this is done, you may safely disable two-step verification without revoking the one-time password.
Joel G Mathew, known in tech circles by the pseudonym Droidzone, is an opensource and programming enthusiast.
He is a full stack developer, whose favorite languages are currently Python and Vue.js. He is also fluent in Javascript, Flutter/Dart, Perl, PHP, SQL, C and bash shell scripting. He loves Linux, and can often be found tinkering with linux kernel code, and source code for GNU applications. He used to be an active developer on XDA forums, and his tinkered ROMS used to be very popular in the early 2000s.
His favorite pastime is grappling with GNU compilers, discovering newer Linux secrets, writing scripts, hacking roms, and programs (nothing illegal), reading, blogging. and testing out the latest gadgets.
When away from the tech world, Dr Joel G. Mathew is a practising ENT Surgeon, busy with surgeries and clinical practise.