Send copy of order confirmation email, based on customer data, to different email addresses

Send copy of order confirmation email, based on customer data, to different email addresses

September 15, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Send copy of order confirmation email, based on customer data, to different email addresses

Sending Order Confirmation Emails to Multiple Recipients in Magento

As an experienced e-commerce developer, I often receive questions from merchants about extending the functionality of their store’s email notifications system. In this post, we’ll tackle a common scenario: sending copy order confirmation emails based on customer data to different email addresses.

Understanding the Current Setup

You’ve already made some progress by creating an observer for the checkout_onepage_controller_success_action event and loading the necessary order data using Magento’s sales model:

$order = Mage::getModel('sales/order')->load($observer->getOrderIds());

This allows you to access all relevant information about the newly placed orders.

Selecting Destination Email Addresses

You mentioned that some code is responsible for selecting the recipient email addresses. Without the specific implementation, I’ll assume you’re using a custom logic or extension to determine these addresses based on customer attributes or other business rules.

Let’s say you have an order attribute additional_email which stores the email address where the copy should be sent:

$copyEmail = $order->getData('additional_email');

Sending Copy Order Confirmation Emails

The key to sending a copy of the order confirmation email lies in using Magento’s email template and sender. Since you already have access to the order object, you can use the sendEmailCopyOf method provided by Magento:

if ($copyEmail) {
    $translate = Mage::getSingleton('core/translate');
    /* @var $translate Mage_Core_Model_Translate */
    $translate->init('frontend', true);

    Mage::getModel('core/email_template')
        ->setDesignConfig(array('area' => 'adminhtml', 'store' => Mage::app()->getStore()->getId()))
        ->sendTransactional(
            Mage::getStoreConfig(self::XML_PATH_EMAIL_TEMPLATE),
            Mage::getStoreConfig(self::XML_PATH_EMAIL_IDENTITY),
            $copyEmail,
            $order->getCustomerName(),
            array('order' => $order)
        );
}

In this example, replace self::XML_PATH_EMAIL_TEMPLATE and self::XML_PATH_EMAIL_IDENTITY with the XML paths to your custom email template and identity configuration.

Conclusion

To summarize, you can send copy order confirmation emails to multiple recipients in Magento by:

  1. Accessing the necessary order data through an observer.
  2. Determining the recipient email addresses based on customer attributes or other business logic.
  3. Using Magento’s built-in sendTransactional method to send the email using your custom template and identity.

This approach ensures that you can maintain a clean separation of concerns while extending Magento’s default functionality to meet your specific requirements.

For more advanced email customization techniques, I recommend checking out Laravel Company, where we provide in-depth tutorials and guides on integrating emails with e-commerce platforms like Magento.

Checkout Extensions Themes Email

Our network