Search code examples
magentomagento-1.9transactional-email

Add replyTo in Magento Transactional Email


What I'm trying to do is to add a replyto field to the core transactional emails of magento. Something like what was archieved in this post with bcc, but for replyTo. Any ideia?

Update: Just to clarify this a little. In the magento TEMPLATE class it is possible to add the replyTo header (core function), but in the MAILER class it is not possible to do that. And that is what I need.


Solution

  • There’s no need to extend any class.

    Just use:

    $mailTemplate = Mage::getModel('core/email_template');
    $mailTemplate->setReplyTo('[email protected]');
    $mailTemplate->sendTransactional($templateId, $sender, $recipient, '', $vars, $storeId);