Cron Job Not Sending Email Messages

EasyApache 4
My Mautic version is: 45_mautic-449
My PHP 80, PHP 8.0.29-1.1.3.cpanel
extention: php80-php-fileinfo
cPanel & WHM on AlmaLinux
OS: AlmaLinux v8.8.0 STANDARD kvm
cPanel Version 112.0.5

Hi everyone,

The current cron job configuration does not send outbound email messages after depressing the send button (“There are no pending contacts”):

*/5 * * * * /usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:segment:update --list-id=12 --batch-limit=1800 >/dev/null 2>&1
*/5 * * * * /usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:segment:update --list-id=13 --batch-limit=1800 >/dev/null 2>&1
*/5 * * * * /usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:segment:update --list-id=14 --batch-limit=1800 >/dev/null 2>&1
*/5 * * * * /usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:segment:update --list-id=4 --batch-limit=1800 >/dev/null 2>&1

I would appreciate your help in debugging the failed cron job configuration.

Thanks,
Hal
DevCED Team

Hello,
If you have no pending contacts, there is nothing to send. Did you send the email in question already out? One segment email can be sent to the same contacts only 1x.

There are no sent or read metrics after pressing the send button after the cron job configuration update. See the captured screenshot images.

Couple of comments:

  1. There are no pending contacts here. It should look like this if you have pending contacts:

image

For the email in the first row it seems, there are no contacts qualifying.

  1. You are using gmail as smtp. This explains the super bad opening rate: 7 emails from 34k sent. I think gmail refused to send those messages, and you didn’t get anything out.

Gmail won’t allow you to send more then 500 - 2000 emails / day, the rest will fail and Mautic won’t even notice that. You can get your reputation ruined in no time like this.

Hal, I mean this the best possible and most respectful way:
Mautic is not easy on beginners, but you lack some basic deliverability and strategic knowledge. I think you should hire someone who understand Mautic better.
Or take a Mautic course, there are many (I have one for beginners for $50.)

Joey

1 Like

Hi Joey,

Google Workspace authorized our account with 2 million Gmail API messages per day:

The issue is that Mautic does not have a plugin to support the Gmail API. The Mautic Plugin supports Amazon SES API (Amazon has set our daily quota rate at 50,000).

I believe you are correct; Gmail SMTP limits the number of daily email messages. Please see the error log below:

DATA

<< 421-4.7.0 Try again later, closing connection. (MAIL)
421-4.7.0 Learn more at
421 4.7.0 About SMTP error messages - Google Workspace Admin Help 8-20020a17090a19c800b0027cfb5f010dsm38124pjj.4 - gsmtp

!! The expected response code is 250, but the received code is “421,” with the message "421-4.7.0 Try again later, closing connection. (MAIL)
421-4.7.0 Learn more at
421 4.7.0 About SMTP error messages - Google Workspace Admin Help 8-20020a17090a19c800b0027cfb5f010dsm38124pjj.4 - gsmtp
" (code: 421) (code: 421)

However, Google Workspace has stated that they removed our account’s SMTP daily quota limit.

Once again, is there a Mautic plugin that supports Gmail API email messages?

I currently have an open ticket with Google Workspace to affirm our business account’s daily quota limit for SMTP and Gmail API messages.

Regards,
Hal
DevCED Team

My recommendation is to switch to Amazon SES, and setup the feedback loop correctly for bounce/complaint

I’m throwing away 2 million daily email contacts with Amazon SES API as opposed to Gmail API. Can we build a Mautic plugin using Nodemailer Library?

If you know how to, then why not.

Couple of things to consider:

  1. You will need a proper feedback loop. Once you start sending and you go over 1% of spamrate Gmail will cut you off and can say goodbye to your reputation.

  2. You will need to modify Mautic if you want to send 2 million emails / day. Even if it’s 200k / day.

Joey

joeyk,

Are these the best integration steps from Node Mailer to Mautic using the Mautic API as follows:

  1. Upload contact data (from a CSV or Excel file) into Node Mailer
  2. Send each contact from Node Mailer to Mautic using the Mautic API
  3. For each contact, generate a unique token tag and dynamic URL link in Mautic
  4. Send outbound emails for each contact using the Gmail API with OAuth 2.0 authentication

Regards,
Hal
DevCED Team

Hello,
I’m sorry, but I don’t know why would you do any of this.
I hope someone else will chime in.
Joey

Joey,

Mautic does not have a Gmail API plugin:

The only option is to build a new plugin ( i.e., Node Mailer) to send daily outbound messages from my allocated Gmail API quota (i.e., 1,771,789):

As compared to Amazon SES with a daily quota of only 50k email messages:

Regards,
Hal
DevCED

Hi @team,
just to chime in my 2 cents on this topic:

Mautic used to support Gmail as a “Service to send mail through” back in Mautic 3, but there was a good reason it was removed (which I dont remember exactly tbh).

Amazon SES, just as Joey already said, is the usual standard for sending large amounts of mails using Mautic.

So either bite the bullet and make the switch and use the Amazon SES integration or feel free to establish your own plugin to send emails through Gmail, its up to you!

We have a setup that sends out about 2 Mil mails/day using Mautic & Amazon SES, so it is definitely possible.

Best
Leon

Hi Leon_Oltmanns,

First, the Mautic Gmail plugin did not support the Gmail API using OAuth 2.0. Additionally, Amazon CloudWatch provides metrics and feedback on all email traffic, unlike Google Ops Agents. That’s why our DevCED Team’s plugin will route traffic through Amazon CloudWatch.

Regards,
Hal
DevCED Team

Are you pushing out Amazon SES email messages from multiple Amazon accounts? How do you manage your email reputation? How do you follow Amazon’s best practices to email contacts that have specifically requested your mail?

Hi @team,
I wont go into too much detail, but:

  1. We have multiple dedicated IPs
  2. Started slow, increased to heavier sends over the course of 6 monthish
  3. Setup a feedbackloop regarding bounces and have a smart unsubscribe system

Best
Leon

Hi Leon_Oltmanns,

When you refer to ‘smart unsubscribe system,’ do you mean allows recipients to customize their email preferences, such as selecting specific types of emails they want to receive or opting out of all communications from a particular sender? Is your feedback loop limited to only Amazon Cloudwatch and Amazon SES?

Thanks,
Hal
DevCED Team

Amazon SNS is needed for the feedback loop, not Cloudwatch. Plz read the whole mautic docs about feedback loops. You can find my videos as well on this topic.

1 Like

Hi Joeyk,

I don’t see ‘feedback loops’ in any of my Mautic online resources:

What Mautic document are you referring to?

Regards,
Hal
DevCED Team

Hi Joeyk,

Are you referring to ‘Bounce management’ and ‘Email Marketing’?

Regards,
Hal
Dev CED

Yes, indeed.

1 Like