Sending transactional emails

Tweet, share & co

tweet fb share g+ share

Tags


Description

Sending transactional emails

Code

$email = Mage::getModel('core/email_template');

$email->sendTransactional(
    'some_email_template',                                                 // template
    array('name' => 'Your Company', 'email' => 'contact@yourcompany.com'), // sender details
    'joe@joebloggs.com',                                                   // recipient email
    'Joe Bloggs',                                                          // recipient name
    array('customerName' => 'Joe Bloggs'),                                 // merge vars
    Mage::app()->getStore()->getStoreId()                                  // store id
);