You can (and should) do this without enabling less secure apps. Create
an app-specific password for the user and use that instead:
https://myaccount.google.com/apppasswords Accounts that have 2FA turned
on are not allowed to enable less secure apps a...