1
votes

My website is live and the order confirmation emails are neither being sent to the customer nor the admin. I am using Magento 1.9.3.2.

3

3 Answers

2
votes

Please check whether Cron jobs are working or not, you can check easily by installing AOE SCHEDULER extension, make sure you have proper setting in System > Configuration > Advanced > System > Cron Also check whether you entered sender email in System > configuration> Sales> Sales email > Order emails.

0
votes

Just to add to the above, out of the box the cronjobs are pre-configured in Magento, but you need to setup the actual job on your servers cron tab.

In SSH open the crontab;

crontab -e

Add this;

### MAGENTO CRON ###
*/1 * * * * cd /path/to/magento/ && sh cron.sh

Replaced /path/to/magento with the actual path your installation.

0
votes

Magento allow 2 way to send email like below :

1) Using cron 2) Avoid cron

If you want without cron then use below change:

Open your order.php file at - app/code/core/Mage/Sales/Model/Order.php

And change :

//$mailer->setQueue($emailQueue)->send(); **// Comment this code.**

to:

$mailer-> send();

Note : Above change is not standard way in magneto so please implement file override way.

Go to : app/design/frontend/base/default/template/checkout/success.phtml:

Add following code on the top of the file code :

$order = Mage::getModel('sales/order');
$incrementId = Mage::getSingleton('checkout/session')->getLastRealOrderId(); 
$order->loadByIncrementId($incrementId);
try
{ 
  $order->sendNewOrderEmail();
} 
catch (Exception $ex) 
{ 
  echo "Email Not Sent..."; 
}
$customer = Mage::getSingleton('customer/session')->getCustomer();
$email = $customer->getEmail();