# Cron Job Not Sending Email Messages

**URL:** <https://forum.mautic.org/t/cron-job-not-sending-email-messages/29712>\
**Category:** Product Support\
**Tags:** mautic-4\
**Created:** [October 19, 2023, 3:32am UTC](https://forum.mautic.org/t/cron-job-not-sending-email-messages/29712 "2023-10-19T03:32:33Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![team](https://avatars.discourse-cdn.com/v4/letter/t/b5a626/32.png) [@team](https://forum.mautic.org/u/team)\
**Post date:** [October 19, 2023, 3:32am UTC](https://forum.mautic.org/t/cron-job-not-sending-email-messages/29712/1 "2023-10-19T03:32:33Z")

</div>

**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

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [October 19, 2023, 6:04am UTC](https://forum.mautic.org/t/cron-job-not-sending-email-messages/29712/2 "2023-10-19T06:04:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![team](https://avatars.discourse-cdn.com/v4/letter/t/b5a626/32.png) [@team](https://forum.mautic.org/u/team)\
**Post date:** [October 19, 2023, 8:50am UTC](https://forum.mautic.org/t/cron-job-not-sending-email-messages/29712/3 "2023-10-19T08:50:17Z")

</div>

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

 ![2023-10-19 01.38.35 mautic.devced.com 9a9d16512b3a](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/b/b4821991e5767e63f53a3a0e4cc38798bcbce378.png)

 ![2023-10-19 01.39.50 mautic.devced.com 180ed41082b9](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/5/5ce4f814a5b24113a59e6aab99172dabe867c051.png)

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [October 19, 2023, 12:55pm UTC](https://forum.mautic.org/t/cron-job-not-sending-email-messages/29712/4 "2023-10-19T12:55:01Z")

</div>

Couple of comments:

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

![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/8/8ada0f315c49dd8bfe5b76fc505d5929c18dc1f7.png)

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

---

<div class="post-metadata">

**Author:** ![team](https://avatars.discourse-cdn.com/v4/letter/t/b5a626/32.png) [@team](https://forum.mautic.org/u/team)\
**Post date:** [October 19, 2023, 8:14pm UTC](https://forum.mautic.org/t/cron-job-not-sending-email-messages/29712/5 "2023-10-19T20:14:33Z")

</div>

Hi Joey,

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

 ![2023-10-19 13.07.58 console.cloud.google.com 6ab0898473ba](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/8/8c9047fdcbee584c6daf1cee9a1cc5481a3ccdfb.png)

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](https://support.google.com/a/answer/3221692) 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](https://support.google.com/a/answer/3221692) 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

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [October 20, 2023, 10:09am UTC](https://forum.mautic.org/t/cron-job-not-sending-email-messages/29712/6 "2023-10-20T10:09:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![team](https://avatars.discourse-cdn.com/v4/letter/t/b5a626/32.png) [@team](https://forum.mautic.org/u/team)\
**Post date:** [October 20, 2023, 6:03pm UTC](https://forum.mautic.org/t/cron-job-not-sending-email-messages/29712/7 "2023-10-20T18:03:50Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [October 21, 2023, 2:12pm UTC](https://forum.mautic.org/t/cron-job-not-sending-email-messages/29712/8 "2023-10-21T14:12:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![team](https://avatars.discourse-cdn.com/v4/letter/t/b5a626/32.png) [@team](https://forum.mautic.org/u/team)\
**Post date:** [October 23, 2023, 3:05am UTC](https://forum.mautic.org/t/cron-job-not-sending-email-messages/29712/9 "2023-10-23T03:05:01Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [October 23, 2023, 4:35am UTC](https://forum.mautic.org/t/cron-job-not-sending-email-messages/29712/10 "2023-10-23T04:35:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![team](https://avatars.discourse-cdn.com/v4/letter/t/b5a626/32.png) [@team](https://forum.mautic.org/u/team)\
**Post date:** [October 23, 2023, 11:59am UTC](https://forum.mautic.org/t/cron-job-not-sending-email-messages/29712/11 "2023-10-23T11:59:55Z")

</div>

Joey,

Mautic does not have a Gmail API plugin:

 ![Mautic Plugin](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/b/b0c22dde116527dc23c40b653d414296dc56bedc.png)

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):

 ![2023-10-22 19.30.34 console.cloud.google.com 22b487298a7f](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/f/f06998c420b9b0f421af8a9e5fdcea8654189668.png)

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

 ![2023-10-23 04.56.45 us-west-2.console.aws.amazon.com 92d368ba448d](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/4/486967db9f3a5a726f1ebe4d2cc17ce346714626.png)

Regards,  
Hal  
DevCED

---

<div class="post-metadata">

**Author:** ![Leon\_Oltmanns](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/leon_oltmanns/32/10629_2.png) [@Leon\_Oltmanns](https://forum.mautic.org/u/Leon_Oltmanns)\
**Post date:** [October 23, 2023, 12:46pm UTC](https://forum.mautic.org/t/cron-job-not-sending-email-messages/29712/12 "2023-10-23T12:46:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![team](https://avatars.discourse-cdn.com/v4/letter/t/b5a626/32.png) [@team](https://forum.mautic.org/u/team)\
**Post date:** [October 23, 2023, 1:17pm UTC](https://forum.mautic.org/t/cron-job-not-sending-email-messages/29712/13 "2023-10-23T13:17:43Z")

</div>

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.

 ![2023-10-23 06.04.56 us-west-2.console.aws.amazon.com 13c601d34c13](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/4/48ed1ea6f1c538b4abbdf953512a7ee97ab19013.png)

 ![2023-10-23 06.07.30 console.cloud.google.com e0751ba70624](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/3/34d6005b908a954eb16d83f1562121ac742304d9.png)

Regards,  
Hal  
DevCED Team

---

<div class="post-metadata">

**Author:** ![team](https://avatars.discourse-cdn.com/v4/letter/t/b5a626/32.png) [@team](https://forum.mautic.org/u/team)\
**Post date:** [October 23, 2023, 3:41pm UTC](https://forum.mautic.org/t/cron-job-not-sending-email-messages/29712/14 "2023-10-23T15:41:14Z")

</div>

> [@Leon\_Oltmanns](#):
>
> We have a setup that sends out about 2 Mil mails/day using Mautic & Amazon SES, so it is definitely possible.

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?

---

<div class="post-metadata">

**Author:** ![Leon\_Oltmanns](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/leon_oltmanns/32/10629_2.png) [@Leon\_Oltmanns](https://forum.mautic.org/u/Leon_Oltmanns)\
**Post date:** [October 24, 2023, 7:23am UTC](https://forum.mautic.org/t/cron-job-not-sending-email-messages/29712/15 "2023-10-24T07:23:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![team](https://avatars.discourse-cdn.com/v4/letter/t/b5a626/32.png) [@team](https://forum.mautic.org/u/team)\
**Post date:** [October 24, 2023, 9:53am UTC](https://forum.mautic.org/t/cron-job-not-sending-email-messages/29712/16 "2023-10-24T09:53:46Z")

</div>

> [@Leon\_Oltmanns](#):
>
> Setup a feedbackloop regarding bounces and have a smart unsubscribe system

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

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [October 25, 2023, 5:13am UTC](https://forum.mautic.org/t/cron-job-not-sending-email-messages/29712/17 "2023-10-25T05:13:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![team](https://avatars.discourse-cdn.com/v4/letter/t/b5a626/32.png) [@team](https://forum.mautic.org/u/team)\
**Post date:** [October 25, 2023, 8:12am UTC](https://forum.mautic.org/t/cron-job-not-sending-email-messages/29712/18 "2023-10-25T08:12:39Z")

</div>

> [@joeyk](#):
>
> feedback loops

Hi Joeyk,

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

 ![2023-10-25 01.09.35 kb.mautic.org a90bd3bf8206](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/3/3019b7e441239d02a051468d1f7d3bd348b28370.png)

 ![2023-10-25 01.09.53 developer.mautic.org 5ac6ba1efd16](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/3/32c1cd4f23c8a87b3ebfdc328550ae03868eddb4.png)

 ![2023-10-25 01.09.17 github.com 56fc6d78e43d](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/f/f759628f647c4779afe94a2acf1c56ee13d9dac6.png)

What Mautic document are you referring to?

Regards,  
Hal  
DevCED Team

---

<div class="post-metadata">

**Author:** ![team](https://avatars.discourse-cdn.com/v4/letter/t/b5a626/32.png) [@team](https://forum.mautic.org/u/team)\
**Post date:** [October 25, 2023, 8:31am UTC](https://forum.mautic.org/t/cron-job-not-sending-email-messages/29712/19 "2023-10-25T08:31:56Z")

</div>

Hi Joeyk,

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

 ![2023-10-25 01.28.15 docs.mautic.org e96348b87fa0](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/8/862df3589cb4d797c0b4b44fdfb46f0f743b4534.png)

 ![2023-10-25 01.28.36 app.elasticemail.com 34218bcd19de](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/5/5bba2635dc232ef37bbaed58c8c95428f7db371c.png)

Regards,  
Hal  
Dev CED

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [October 25, 2023, 10:40am UTC](https://forum.mautic.org/t/cron-job-not-sending-email-messages/29712/20 "2023-10-25T10:40:18Z")

</div>

Yes, indeed.

[Next page](https://forum.mautic.org/t/cron-job-not-sending-email-messages/29712.md?page=2)
