Mautic Not sending emails

I noticed that mautic stopped sending emails when someone filled out a form on our website.

After doing some research, I found that the entries I made to the cron job were not in the daemon user but the root user. I moved them to daemon

Still no emails.

If I run “service cron status”, The following displays

May 03 12:47:01 ubuntu-1 CRON[18355]: pam_unix(cron:session): session opened for user daemon by (uid=0)
May 03 12:47:01 ubuntu-1 CRON[18356]: pam_unix(cron:session): session opened for user daemon by (uid=0)
May 03 12:47:01 ubuntu-1 CRON[18357]: (daemon) CMD (/usr/local/ispconfig/server/cron.sh 2>&1 | while read line; do echo /bin/date “$line” >> /va$)
May 03 12:47:01 ubuntu-1 CRON[18358]: (daemon) CMD (/usr/local/ispconfig/server/server.sh 2>&1 | while read line; do echo /bin/date “$line” >> /$)
May 03 12:47:01 ubuntu-1 CRON[18355]: pam_unix(cron:session): session closed for user daemon
May 03 12:48:01 ubuntu-1 CRON[18382]: pam_unix(cron:session): session opened for user daemon by (uid=0)
May 03 12:48:01 ubuntu-1 CRON[18383]: pam_unix(cron:session): session opened for user daemon by (uid=0)
May 03 12:48:01 ubuntu-1 CRON[18384]: (daemon) CMD (/usr/local/ispconfig/server/cron.sh 2>&1 | while read line; do echo /bin/date “$line” >> /va$)
May 03 12:48:01 ubuntu-1 CRON[18385]: (daemon) CMD (/usr/local/ispconfig/server/server.sh 2>&1 | while read line; do echo /bin/date “$line” >> /$)
May 03 12:48:01 ubuntu-1 CRON[18382]: pam_unix(cron:session): session closed for user daemon

Just ran it again and got this:

mediamix@ubuntu-1:~$ service cron status
● cron.service - Regular background program processing daemon
Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: ena
Active: active (running) since Wed 2018-05-02 11:55:33 EDT; 24h ago
Docs: man:cron(8)
Main PID: 1518 (cron)
Tasks: 1
Memory: 11.4G
CPU: 19min 11.231s
CGroup: /system.slice/cron.service
└─1518 /usr/sbin/cron -f

May 03 12:50:03 ubuntu-1 getmail[18433]: getmailOperationError error (POP error
May 03 12:50:05 ubuntu-1 getmail[18433]: getmailOperationError error (POP error
May 03 12:50:07 ubuntu-1 getmail[18433]: getmailOperationError error (POP error
May 03 12:50:09 ubuntu-1 getmail[18433]: getmailOperationError error (POP error
May 03 12:50:11 ubuntu-1 getmail[18433]: getmailOperationError error (POP error
May 03 12:50:13 ubuntu-1 getmail[18433]: getmailOperationError error (POP error
May 03 12:50:15 ubuntu-1 getmail[18433]: getmailOperationError error (POP error
May 03 12:50:21 ubuntu-1 getmail[18433]: getmailOperationError error (POP error
May 03 12:50:23 ubuntu-1 getmail[18433]: getmailOperationError error (POP error
May 03 12:50:25 ubuntu-1 getmail[18433]: getmailOperationError error (POP error
lines 1-21/21 (END)…skipping…
● cron.service - Regular background program processing daemon
Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2018-05-02 11:55:33 EDT; 24h ago
Docs: man:cron(8)
Main PID: 1518 (cron)
Tasks: 1
Memory: 11.4G
CPU: 19min 11.231s
CGroup: /system.slice/cron.service
└─1518 /usr/sbin/cron -f

May 03 12:50:03 ubuntu-1 getmail[18433]: getmailOperationError error (POP error (-ERR [AUTH] Authentication failed.))
May 03 12:50:05 ubuntu-1 getmail[18433]: getmailOperationError error (POP error (-ERR [AUTH] Authentication failed.))
May 03 12:50:07 ubuntu-1 getmail[18433]: getmailOperationError error (POP error (-ERR [AUTH] Authentication failed.))
May 03 12:50:09 ubuntu-1 getmail[18433]: getmailOperationError error (POP error (-ERR [AUTH] Authentication failed.))
May 03 12:50:11 ubuntu-1 getmail[18433]: getmailOperationError error (POP error (-ERR [AUTH] Authentication failed.))
May 03 12:50:13 ubuntu-1 getmail[18433]: getmailOperationError error (POP error (-ERR [AUTH] Authentication failed.))
May 03 12:50:15 ubuntu-1 getmail[18433]: getmailOperationError error (POP error (-ERR [AUTH] Authentication failed.))
May 03 12:50:21 ubuntu-1 getmail[18433]: getmailOperationError error (POP error (-ERR [AUTH] Authentication failed.))
May 03 12:50:23 ubuntu-1 getmail[18433]: getmailOperationError error (POP error (-ERR [AUTH] Authentication failed.))
May 03 12:50:25 ubuntu-1 getmail[18433]: getmailOperationError error (POP error (-ERR [AUTH] Authentication failed.))

I am having the same problem. Did you find out how to solve it?

Yes I did. The problem was in the cron job. What worked for me was adding “sudo php” before each line. Not sure if sudu is needed given that the cron job belongs to the root user

10 * * * * sudo php /var/www/clients/client1/web1/web/mautic/app/console mautic:segments:update
10 * * * * sudo php /var/www/clients/client1/web1/web/mautic/app/console mautic:campaigns:rebuild
10 * * * * sudo php /var/www/clients/client1/web1/web/mautic/app/console mautic:campaign:trigger
01 * * * * sudo php /var/www/clients/client1/web1/web/mautic/app/console mautic:emails:send
10 * * * * sudo php /var/www/clients/client1/web1/web/mautic/app/console mautic:email:fetch
10 * * * * sudo php /var/www/clients/client1/web1/web/mautic/app/console mautic:social:monitoring
10 * * * * sudo php /var/www/clients/client1/web1/web/mautic/app/console mautic:webhooks:process
30 2 * * * sudo php /var/www/clients/client1/web1/web/mautic/app/console mautic:iplookup:download
30 2 * * * sudo php /var/www/clients/client1/web1/web/mautic/app/console mautic:maintenaance:cleanup --days-old=$
10 * * * * sudo php /var/www/clients/client1/web1/web/mautic/app/console mautic:broadcasts:send

It didn’t work for me, I’m not sure if I did it right, but it looks like a pretty simple solution…
But thank you for the answer!