SMTP email not authenticating

Hi. Apologies if this is answered elsewhere, but I am pretty confused about what is happening when I try to invite users to my pod. I have created a gmail account for communicating from my server : admin-email@gmail.com
And my diaspora.toml:
sender_address = “admin-email@gmail.com
method = “smtp”
host=“smtp.gmail.com
port=587
username = “admin-email@gmail.com
password= “thepassword

When I then try ( after a warm restart ) to send an invite, it throws a 500 internal server error and the diaspora log has:
Net::SMTPAuthenticationError (535-5.7.8 Username and Password not accepted. For more information, go to
):


lib/email_inviter.rb:30:in mail'** **lib/email_inviter.rb:24:in block in send!’
lib/email_inviter.rb:24:in each'** **lib/email_inviter.rb:24:in send!’
app/controllers/admins_controller.rb:28:in `admin_inviter’

Of course, I’ve checked that username and password repeatedly(!) I’ve tested the smtp connection from that machine instance and it can connect. The gmail account does not have tfa active. Any ideas are very welcome.
thanks
Aidan Dunne

I investigated this more, it seems that google hasn’t supported “less secure apps” for some time now. I’ll look for other options, like SendGrid.
What do people usually use for pod mail?
thx

Enable 2fa and then use an app password for SMTP via your pod.

Worked like a charm. I thought they had deprecated app passwords, but adding 2fa did the trick. Thanks!