Question

I would like to know at what stage in the invoicing process of magento does it send the the invoice email that it sends when you click the "email copy of invoice "? and hit "submit invoice"?

I have heard mixed information, with some suggesting the email is sent before the creation of the invoice.

I believe that the email is sent once an invoice is created and saved in the database/model.

If anyone would be able to explain this to myself I would thoroughly appreciate it.

checkbox screengrab

Was it helpful?

Solution

You can see this in action inside Mage_Adminhtml_Sales_Order_InvoiceController class in Magento. Take a look at saveAction inside that class. Sending email is the last step of the process, after Magento has saved the invoice in Database.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top