Support for sending emails through Gmail on Google Workspace

Your software
My Mautic version is: 6.0.4
My PHP version is: 8.2.29
My Database type and version is: 10.11.11-MariaDB-0+deb12u1

Your problem
I have a Google Workspace Gmail account with a custom domain name and I am trying to set up Mautic to send out emails with this account with no success. I’ve tried using the SMTP relay feature of Google Workspace, but honestly, I am not exactly sure if SMTP relay is what I want? I get password denied when I try this. The documentation on Google is super vague on how authentication works, but I can’t seem to find anything else.

I also found a Gmail plugin for Mautic, but there’s zero documentation on how to set it up.

First question is, does Mautic even support sending out email through Google Workspace/Gmail? If not, why can, for example, Apple Mail send on Gmail, but not Mautic? Does Google only allow certain email clients?

The second question is, why is it so hard to find an answer on this? I’ve seen some forum posts in passing mention they got Gmail to work, but nothing else. Surely Gmail is a pretty popular service and there should be some sort of documentation mentioning whether Gmail is supported or not. But I am new to the mass emailing world, so maybe not?

Thank you!

Hi @danb91 ,

I think most folks avoid using Gmail as an email service provider because it has quite a lot of limitations on what you can do - it’s not designed to be used for mass mailing, which is what Mautic is designed to do. Especially if you start to scale, it just won’t allow you to send at volume.

A standard Gmail account has a daily sending limit of 500 emails. Google Workspace accounts can send up to 2,000 emails per day. These limits apply to emails sent in a rolling 24-hour period.

There’s also some things that it just doesn’t let you do, some of which are quite important as a marketer.

Bounce monitoring is problematic as it rewrites the return path - from the docs:

If sending mail through GMail, the Return Path of the Email is automatically rewritten as the GMail address. It’s best to use a sending method other than GMail

Base64 encoding also doesn’t work:

While it’s technically feasible to do at lower levels, I believe, using app passwords, it’s probably a good idea to explore an actual Email Service Provider (many of which have free tiers for lower volume sending) as it will just cause a world of pain further down the line.

Sorry, and hope that helps!

Dan, I set up Mautic to use Gmail SMTP Relay. It has been working for the last month, but is now giving me an error. I don’t know why that is. What’s worrisome is that their tech support said to wait 24 hours to see if it clears up.

SMTP Relay has a much higher daily limit: 10,000.

Dan, if you’re sending your authentication information, then you might be a little off base. The recommended settings are to use routing settings to limit the SMTP Relay to only accept from one IP address.

Like I said, it was working for me. It just stopped yesterday. Now I get this error whenever I try to send an email:
Expected response code “250” but got code “421”, with message “421-4.7.0 Try again later, closing connection. (EHLO) 421-4.7.0 For more information, go to 421 4.7.0 About SMTP error messages - Google Workspace Admin Help e9e14a558f8ab-3e57e68a206sm7092135ab.23 - gsmtp”.

Dan,

You can find the settings in your Google Workspace Admin, under Apps | Google Workspace | Gmail | Routing. Under the SMTP relay service option, add a new role. Set authentication to Only accept mail from the specified IP addresses, and add the IP address of your Mautic server.

So I was finally actually able to connect it to Gmail with a generated App password. Which is what I was trying before I made this thread, but for some strange reason, Google displays the app password with extra spaces that you have to delete, which I didn’t realize.

But good to know about the SMTP relay stuff, will try that out. Did it start working again?

If you’re using just your regular Gmail account, you need to be careful about hitting your daily limits. That’s 2000 emails per 24 hour period for a Google Workspace account. SMTP Relay has a 10,000 email limit.

My needs are particular, in that I want to be able to have the emails sent from the owner. That was working until this week. Even with plain SMTP, that is not working.

I switched to Amazon SES, which is working, but it has a known issue when multiple emails are sent with different owners.

Glad yours is working, wish mine was.