In my case, if order placed by cash on delivery or bank deposit, the mail not automatically send to customer, if i click to send mail from backend then only customer get mail.
3 Answers
Since Magento ver 1.9.1 the order e-mails are scheduled to be send through the cron instead of directly. To enable cron for your Magento installation check: http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/how_to_setup_a_cron_job
- 540
- 1
- 4
- 11
Transactional emails will send through CRON.
if you want to avoid cron, follow this way, it will help you.
//app/code/core/Mage/Sales/Model/Order.php Line#1356,1450
//$mailer->setQueue($emailQueue)->send(); Change To
$mailer->send();
app/design/frontend/base/default/template/checkout/success.phtml
//add following line Top success page for sending mail direct
// Start Send Emai Here......
$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();//End Email Sending
- 3,816
- 5
- 32
- 69
-
-
Hello @JeevaRathinam, Transactional emails will send through CRON. if you want to avoid cron, follow this way, it will help you. – Teja Bhagavan Kollepara Sep 07 '16 at 06:37
-
i typed this in answer. so, if u avoid this, every mail will go without cron permission. – Teja Bhagavan Kollepara Sep 07 '16 at 06:38
In Magento 1.9.1 the emails are not being sent directly after order place. Email is stored in queue. The queue is being processed via your Magento cronjob - please ensure this has been set up and is running correctly.
There is two way to send order mail:
1.Using cron:
If you want your Transaction Emails to be sent through Cron, you can set the cron from from System > Configuration > System under tab Cron OR create cron in Cpanel direct it to your cron.sh or cron.php located in your root Magento directory.
2.Avoid cron: Transactional emails will be sent instantly.
Step 1: Go to app/code/core/Mage/Sales/Model/Order.php at Line no: 1356,1450
There will be given below code:
$mailer->setQueue($emailQueue)->send();
Change this to:
$mailer->send();
Step 2: Go to app/design/frontend/base/default/template/checkout/success.phtml
Add following code at top of the success page for sending mail directly
Start Send Email Here......
$order = Mage::getModel('sales/order');
$incrementId = Mage::getSingleton('checkout/session')->getLastRealOrderId();
$order->loadByIncrementId($incrementId);
try{ $order->sendNewOrderEmail();}
catch (Exception $ex) { echo "Email Not Sent..."; }
- 2,592
- 15
- 14
password reset or contact form? – Baby in Magento Sep 07 '16 at 05:42