As of 30th May 2022 Google have discontinued using insecure app passwords to authenticate, which was require to bypass their requirement for 2-step authentication.
I can no longer retrieve emails from gmail account using imap details.
Any suggestions?