cancel
Showing results for 
Search instead for 
Did you mean: 

emails not sending, cron working

emails not sending, cron working

 

I have a problem with emails not sending,

 

I had a problem with cron yesterday 'No heartbeat task detected' and solved it by amending the cron.php file by adding

 

$isShellDisabled = true;

after the line

 

 

$isShellDisabled = (stripos(PHP_OS, 'win') === false) ? $isShellDisabled : true;

This solved my problem with the cron heartbeat error, but my site still isn't sending emails

 

I've added two Cron Jobs in CPanel as directed to

 

test -e /home/dan/public_html/maintenance.flag && /bin/bash /home/dan/public_html/scheduler_cron.sh --mode always

and

 

 

test -e /home/dan/public_html/maintenance.flag && /bin/bash /home/dan/public_html/scheduler_cron.sh --mode default

emails where still not sending

 

I've tried amending /app/code/core/Mage/Core/Model/Email/Template.php

from

 

if ($this->hasQueue() && $this->getQueue() instanceof Mage_Core_Model_Email_Queue) {

to

 

 

if (!($this->hasQueue() && $this->getQueue() instanceof Mage_Core_Model_Email_Queue)) {

then to

 

if (!($this->hasQueue()) && $this->getQueue() instanceof Mage_Core_Model_Email_Queue) {

and then to

if (false){

nothing has worked

 

I would appreciate some help 

 

 

4 REPLIES 4

Re: emails not sending, cron working

Maybe a daft question but have you checked that it’s not that the emails are not being received? If you aren’t sending via SMTP or an email sending service such as Dotmailer or Mandrill then It may be that they are just getting blocked by the inbound server. If you haven’t got an SMTP extension in yet I’d get down of the those on the go. Most come with logging and visibility of what’s being sent or not.
Chris @ Rixxo
Magento Solution Specialist, 10 year Magento user, store owner and Agency Director

Re: emails not sending, cron working

I'm not sending them from mandrill or anything like that, they are just being sent straight from magento. 

Re: emails not sending, cron working

how would i know if they're just being blocked?

Re: emails not sending, cron working

What mail service did you configure on your server? Generally you can go have a look at /var/log/maillog to see if there are any issues sending from your server.

If my answer helps you solve your problem don't forget to accept it as a solution.