How to send email from your Google Workplace hosted email account

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:

  1. Go to [Apps > Google Workspace > Gmail > Routing]
  2. Next to SMTP relay service, click Configure.
  3. 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:

MAIL_MAILER=smtp
MAIL_HOST=smtp-relay.gmail.com
MAIL_PORT=587
MAIL_USERNAME=xxxx
MAIL_PASSWORD=xxxx
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=xxxx
MAIL_FROM_NAME=xxxx

Hope this helps somebody!

1 Like

Hi,

Thanks for sharing the solution!

cc @david