I have been running a custom smtp successfully for several years. Now it seems (as of March 2025) that google has reverted the support for “less secure apps” - please see link below.
This just isn’t supported by Google anymore. You can still send emails via the GMail API, but Google tends to discourage the use of GMail for sending email. I recommend you checkout actual SMTP services such as Sendgrid or Mailjet, the latter of which has a free plan.
I just want to show how it looks like in eg Synology NAS. When configuring a email sender, one can sign in with eg google account (oauth).
Would be great to have the similiar options in Anvil But i guess thats perhaps a feature request.