EnlightMailHandler example

$logLevel = \Monolog\Logger::toMonologLevel($config->get('logMailLevel'));
        $recipients = array_filter(explode("\n", $config->get('logMailAddress')));

        if (\count($recipients) < 1) {
            $recipients[] = $config->get('mail');
        }

        $mailer = new \Enlight_Components_Mail();
        $mailer->addTo($recipients);
        $mailer->setSubject('Error in shop "' . $config->get('shopName') . '".');
        $mailHandler = new EnlightMailHandler($mailer$logLevel);
        $mailHandler->pushProcessor(new ShopwareEnvironmentProcessor());
        $mailHandler->setFormatter(new HtmlFormatter());

        return new BufferHandler($mailHandler, 0, Logger::ERROR);
    }
}
Home | Imprint | This part of the site doesn't use cookies.