Magento: Mail versenden

8. September 2011 at 16:35

send email in magento (php-code) :

$template_var_array = array(
'var_1' => 'value 1',
'var_2' => 'value 2'
);
$sender = array('name' => 'name', 'email' => 'email@adresse.com');
$translate = Mage::getSingleton('core/translate');
$translate->setTranslateInline(false);
$emailTemplate = Mage::getModel('core/email_template');
$emailTemplate->setDesignConfig(array('area' => 'backend'))
->sendTransactional(
Mage::getStoreConfig('core/email_template'),
Mage::getStoreConfig('general'), // alternate $sender
Mage::getStoreConfig('general'), // absender
null,
$template_var_array;
}
}
Daniel Briegert

Daniel Briegert

xing: https://www.xing.com/profile/Daniel_Briegert

More Posts - Website

Follow Me:
TwitterFacebook