So I was struggling like many on here, I couldn’t send email via smtp with my credentials via smtp.google.com.
The solution is to use Gmail’s SMTP relay service that you can configure via your admin panel for your Workplace hosted domain.
Login to your Admin panel:
- Go to [Apps > Google Workspace > Gmail > Routing]
- Next to SMTP relay service, click Configure.
- Set up the SMTP relay service by following the steps in [SMTP relay: Route outgoing non-Gmail messages through Google]
Then, in your env file, use the following:
Hope this helps somebody!