Based on certain customer data I need to send a copy of the confirmation email to other email addresses.
I created an observer to catch the order data
checkout_onepage_controller_success_action
In my observer class I load all data I need with
Mage::getModel('sales/order')->load($observer->getOrderIds());
That works like a charm.
Now some code is selecting the email address where the copy supposed to go to.
But how can I send a copy of the order confirmation email to (always different) email addresses?
$order->sendNewOrderEmail();
Above doesn’t work for me because I need the recipient as a parameter.
Any help will be much appreciated. Thank you.