With Google's policy change effective May 30, 2022, third-party apps or devices that sign in to Google accounts using only a username and password are no longer supported. Consequently, our application's email functionality, which currently uses SMTP with simple username/password authentication, is failing when attempting to send emails through Gmail.
Google now requires the use of OAuth 2.0 for authentication in place of less secure login methods. This is a more secure authentication protocol, allowing applications to authorize with a user's account without exposing their password.