I want to stop magento sending new order email in some cases.

I want to know from the community how to debug and backtrace the function that really send the order email confirmation email.

I've this event :


And in my save_order function i do this :

        catch(exception $e){
            Mage::log('Non inoltra ordine', 1,'orders.log');

But i still receive the new email order. I'm trying to debug core_email_template_mailer and core_email_template but seems that the email is not sent from there.

any help could be appreciated!!

2 Answers 2


I think you can try to create one more Observer method for event sales_order_place_before and move


to that new Observer method


Magento does not use events to send emails for order confirmation.

The email is sent on order save, specifically in the method sendNewOrderEmail() which is defined in /app/code/core/Mage/Sales/Model/Order.php (assuming that there is not custom module that modify it).

There is a setting in the backend: system -> config > sales emails where you can disable them.

If you want another condition I would write a custom module to extend Mage_Sales_Model_Order and add my custom check there in an overwrite of sendNewOrderEmail().

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.