14
votes

I've recently upgraded to Magento CE 1.9.1.0 and our order confirmation emails are not being sent to customers or the employees here that are setup to receive notifications.

I checked the Email Logs and don't see the emails hitting the server at all.

Emails come through from the Contact Form, New User Account Signup and a few test scripts I created on the server. I made sure that Disable Email Communications was set to "No".

Any ideas? They worked great in 1.7.0.2 before we upgraded.

10
This question appears to be off-topic because it is not about programming. You should post it on the Stack Overflow sister-site magento.stackexchange.com.Enigmativity

10 Answers

21
votes

Starting from Magento 1.9 the order confirmation emails are not sent during checkout anymore, instead they are sent with the Cron. To verify this works properly:

  • make sure your system Cron is up and running (you can check the Cron logs: /var/log/cron to verify that).

  • make sure Magento Cron is setup correctly and is running every some minutes. You should see something like this in the Crontab of your system:

    */5 * * * * /public_html/cron.sh

    This schedules a task to run cron.sh every five minute. (More reading)

There are good extensions like AOE Scheduler in Magento that help you to monitor and manage Cron jobs.


An alternative way to this is to disable the Cron for these kind of emails (order confirmation). To do this you can go to this path:

public_html/app/code/core/Mage/Sales/Model/Order.php

Copy that file and bring it to this path (if the path doesn't exist create it):

public_html/app/code/local/Mage/Sales/Model/Order.php

And then change this line:

$mailer->setQueue($emailQueue)->send();

To:

$mailer->send();

However I recommend spending some time to setup the Cron instead. I think if they wanted to use Cron for these emails it's for a reason.

14
votes

Just do a small change in order.php (public_html/app/code/core/Mage/Sales/Model/Order.php)

From

$mailer->setQueue($emailQueue)->send();

To

$mailer->send();
7
votes

Solution is simple that i found.

go to System -> Configuration -> ASCHRODER EXTENSIONS -> SMTP -> Queue Configuration -> Queue Usage -> Never

Done!

Order Confirmation will be sent quickly. :)

1
votes

Quick solution is:

Go to the following location: /app/code/core/Mage/Core/Model/Email/Template.php

Change Line 407

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

To:

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

It will work.

Thanks Pankaj

1
votes

Please ovewrite 'app/code/core/Mage/Sales/Model/Order.php' file.if you dont want to any changes in xml file so So just copy /app/code/core/Mage/Sales/Model/Order.php into /app/code/local/Mage/Sales/Model/Order.php and be sure to refresh the cache. and change

$mailer->setQueue($emailQueue)->send();

To

$mailer->send();
1
votes

Goto /app/code/core/Mage/Core/Model/Email/Template.php

Below changes :

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

To

if (false){
0
votes

I had exactly the same problem. For me it was a local copy of the order.php that I had made some changes to in the past and that I had copied to \app\code\local\Mage\Sales\Model\Order.php.

Thus, the updated order.php of Magento 1.9.1.0 in the core directory was not in usage - causing the order confirmation emails not to be send automatically via the cron job.

I keep the fingers crossed that you suffer from the same issue.

0
votes

Just add cron in cpanel or plesk panel. It will available on cpanel -> Advanced and click cron folder. Then proceed:

  • */5 in the 'minute' field (may customize this)
  • * in the 'hour' field
  • * in the 'day' field
  • * in the 'month' field
  • * in the 'weekday' field

comment: http://www.yoursite.com/absolute/path/to/magento/cron.php

0
votes

There are many answers but none worked for me. How i solved is that, check that if your default template setup are there in the magento or not. Sometimes during installation its lost and actually "there is no email template by default in system to send your email". Please go to Admin side, System->Transactional Email-> by default you will find no template here. So add one by clicking on button 'Add new Email template. In Load default template panel select a template from the Template drop down suppose forgot Password and click and click Load Template. As earlier said no email template is associated with it so it will not be show in below. The bset thing is to go to install a fresh copy of magento in your local system navigate here and put that same content here and click Save Template button. Then go to System->Configuration->Customer Configuration ->Password Options->Change the 'Forgot Email Template' dropdown to yours as added above .Happy . thus same thing you can also do for order ,shipment, new account etc.

0
votes

To debug magento order mail issue regarding new order just run yoursite.com/cron.php If you recieve any mail now then its cron issue. You can fix con issue by setting cron in cpanel.