Sending email using django-allauth, Google Gmail API and OAuth ( post Less Secure Apps )

Hello everyone, now when Less Secure Apps ( Google ) don’t work anymore, is there a way to send email using Gmail API and django-allauth to send out confirmation, password reset… emails? Or is it just better to use a provider for sending emails?

Edit: Okay, i figured it out. You have to create a project at google console, credentials and OAuth. Set proper scope SCOPES = ['https://www.googleapis.com/auth/gmail.send'] and correct URI ( I opened a new port for this one to test locally, but in production you gonna need a service account from google ). Then created a new file email_backend.py in my app folder. In there ( or a separate function ) you have to give access to your project in google console to the app so you can use credentials to send emails. Then override send_email() using your creds. It goes a bit deeper than this, but generally this is all. Will edit this post with proper steps if anyone gets stuck here

My memory is that Gmail (including Google Workspace) has some relatively low limits on the number of unique recipient addresses you can send to each day. As your app usage grows, it quickly becomes impractical to rely on Gmail as your Django email backend.

At some point, you will probably need to switch to a commercial email service provider. Look for one that specifically supports “transactional” messages like password resets, not just “bulk” or “marketing” email. (I maintain django-anymail, which implements Django email backends for several transactional ESPs. I don’t have any particular provider recommendations.)