M1 – wysyłanie e-maili w php

$email = Mage::getModel('core/email_template');
$customerEmail = $_order→getCustomerEmail();
$storeId = Mage::app()->getStore()->getStoreId();
$emailTemplateVariables = [
    'order' => $_order
];
try {
    $email→sendTransactional(
        'payment_reminder_template',
        $sender,
        $customerEmail,
        $sender,
        $emailTemplateVariables
    );
} catch (Exception $error) {
    Mage::getSingleton('core/session')->addError($error→getMessage());
}