Sending Transactional E-Mails

Updated . Posted . Visible to the public.
$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
);

Mike Whitby
Last edit
Posted by Mike Whitby to Magento (2012-03-19 15:30)