On January 2025 google will disable less secure app users must use OAuth with third-party apps to access Gmail https://support.google.com/a/answer/14114704?hl=en-GB