public function sendErrorMail(Aoe_Scheduler_Model_Schedule $schedule, $error)
    {
        if (!Mage::getStoreConfig(self::XML_PATH_EMAIL_RECIPIENT)) {
            return;
        }

        $recipients = $this->trimExplode(',', Mage::getStoreConfig(self::XML_PATH_EMAIL_RECIPIENT), true);

        $translate = Mage::getSingleton('core/translate'); /* @var $translate Mage_Core_Model_Translate */
        $translate->setTranslateInline(false);

        foreach ($recipients as $recipient) {
            $emailTemplate = Mage::getModel('core/email_template'); /* @var $emailTemplate Mage_Core_Model_Email_Template */
            $emailTemplate->setDesignConfig(array('area' => 'backend'));
            $emailTemplate->sendTransactional(
                Mage::getStoreConfig(self::XML_PATH_EMAIL_TEMPLATE),
                Mage::getStoreConfig(self::XML_PATH_EMAIL_IDENTITY),
                $recipient,
                null,
                array('error' => $error, 'schedule' => $schedule)
            );
        }

        $translate->setTranslateInline(true);
    }
public function sendErrorMail(Aoe_Scheduler_Model_Schedule $schedule, $error)
    {
        if (!Mage::getStoreConfig(self::XML_PATH_EMAIL_RECIPIENT)) {
            return;
        }

        $recipients = $this->trimExplode(',', Mage::getStoreConfig(self::XML_PATH_EMAIL_RECIPIENT), true);

        $translate = Mage::getSingleton('core/translate'); /* @var $translate Mage_Core_Model_Translate */
        $translate->setTranslateInline(false);

        foreach ($recipients as $recipient) {
            $emailTemplate = Mage::getModel('core/email_template'); /* @var $emailTemplate Mage_Core_Model_Email_Template */
            $emailTemplate->setDesignConfig(array('area' => 'backend'));
            $emailTemplate->sendTransactional(
                Mage::getStoreConfig(self::XML_PATH_EMAIL_TEMPLATE),
                Mage::getStoreConfig(self::XML_PATH_EMAIL_IDENTITY),
                $recipient,
                null,
                array('error' => $error, 'schedule' => $schedule)
            );
        }

        $translate->setTranslateInline(true);
    }
public function sendErrorMail ( Aoe_Scheduler_Model_Schedule $ schedule , $ error ) { if ( ! Mage :: getStoreConfig ( self :: XML_PATH_EMAIL_RECIPIENT ) ) { return ; } $ recipients = $ this -> trimExplode ( ',' , Mage :: getStoreConfig ( self :: XML_PATH_EMAIL_RECIPIENT ) , true ) ; $ translate = Mage :: getSingleton ( 'core/translate' ) ; /* @var $translate Mage_Core_Model_Translate */ $ translate -> setTranslateInline ( false ) ; foreach ( $ recipients as $ recipient ) { $ emailTemplate = Mage :: getModel ( 'core/email_template' ) ; /* @var $emailTemplate Mage_Core_Model_Email_Template */ $ emailTemplate -> setDesignConfig ( array ( 'area' => 'backend' ) ) ; $ emailTemplate -> sendTransactional ( Mage :: getStoreConfig ( self :: XML_PATH_EMAIL_TEMPLATE ) , Mage :: getStoreConfig ( self :: XML_PATH_EMAIL_IDENTITY ) , $ recipient , null , array ( 'error' => $ error , 'schedule' => $ schedule ) ) ; } $ translate -> setTranslateInline ( true ) ; }
Send error mail

@param Aoe_Scheduler_Model_Schedule $schedule
@param $error
@return void
Send error mail