In Magento 1.9, why are order emails send through the queue, while Invoice emails are sent directly? I checked the code for Order and Invoice, and the order-sendNewOrderEmail
uses the queue, while invoice->sendEmail()
skips it completely. It's making the order email be sent after the invoice email instead of before in case the order is approved automatically!
Magento 1.9 – Why Order Emails Are Sent Through Queue While Invoice Emails Are Sent Directly
emailemail-schedulermagento-1.9order-email
Best Answer
Orders email are sent using the queue for different reasons:
Solution 1 (send order's email immediately):
If you like to send order email immediately you can consider overriding the
Mage_Sales_Model_Order::queueNewOrderEmail()
method by chainging the following lines:to:
Solution 2 (send invoices using queue):
The opposite solution is to let invoices use the queue:
You must override
Mage_Sales_Model_Order_Invoice::sendEmail
changing:To: