library/Garp/ErrorHandler.php
public static function mailErrorToAdmin(ArrayObject $errors) {
        $errorMessage = self::_composeFullErrorMessage($errors);
        $subjectPrefix = '';
        if (isset($_SERVER) && !empty($_SERVER['HTTP_HOST'])) {
            $subjectPrefix = '[' . $_SERVER['HTTP_HOST'] . '] ';
        }

        $ini = Zend_Registry::get('config');
        $to = (
            isset($ini->app) &&
            isset($ini->app->errorReportEmailAddress) &&
            $ini->app->errorReportEmailAddress
        )
            ? $ini->app->errorReportEmailAddress
            : self::ERROR_REPORT_MAIL_ADDRESS_FALLBACK
        ;

        $mailer = new Garp_Mailer();
        return $mailer->send(
            array(
            'to' => $to,
            'subject' => $subjectPrefix . 'An application error occurred',
            'message' => $errorMessage
            )
        );
    }
public static function mailErrorToAdmin(ArrayObject $errors) {
        $errorMessage = self::_composeFullErrorMessage($errors);
        $subjectPrefix = '';
        if (isset($_SERVER) && !empty($_SERVER['HTTP_HOST'])) {
            $subjectPrefix = '[' . $_SERVER['HTTP_HOST'] . '] ';
        }

        $ini = Zend_Registry::get('config');
        $to = (
            isset($ini->app) &&
            isset($ini->app->errorReportEmailAddress) &&
            $ini->app->errorReportEmailAddress
        )
            ? $ini->app->errorReportEmailAddress
            : self::ERROR_REPORT_MAIL_ADDRESS_FALLBACK
        ;

        $mailer = new Garp_Mailer();
        return $mailer->send(
            array(
            'to' => $to,
            'subject' => $subjectPrefix . 'An application error occurred',
            'message' => $errorMessage
            )
        );
    }
public static function mailErrorToAdmin ( ArrayObject $ errors ) { $ errorMessage = self :: _composeFullErrorMessage ( $ errors ) ; $ subjectPrefix = '' ; if ( isset ( $ _SERVER ) && ! empty ( $ _SERVER [ 'HTTP_HOST' ] ) ) { $ subjectPrefix = '[' . $ _SERVER [ 'HTTP_HOST' ] . '] ' ; } $ ini = Zend_Registry :: get ( 'config' ) ; $ to = ( isset ( $ ini -> app ) && isset ( $ ini -> app -> errorReportEmailAddress ) && $ ini -> app -> errorReportEmailAddress ) ? $ ini -> app -> errorReportEmailAddress : self :: ERROR_REPORT_MAIL_ADDRESS_FALLBACK ; $ mailer = new Garp_Mailer ( ) ; return $ mailer -> send ( array ( 'to' => $ to , 'subject' => $ subjectPrefix . 'An application error occurred' , 'message' => $ errorMessage ) ) ; }
Mail an error to an admin

@param ArrayObject $errors
@return void
Mail an error to an admin