black-lamp/blcms-error-handler

There is no license information available for the latest version (v0.1.1) of this package.

Error hadler module for Black-Lamp CMS

v0.1.1 2017-03-09 15:08 UTC

This package is not auto-updated.

Last update: 2024-12-21 20:36:05 UTC


README

Error hadler module for Black-Lamp CMS

Installation

Run command

composer require black-lamp/blcms-error-handler

or add

"black-lamp/blcms-error-handler": "0.*"

to the require section of your composer.json.

Add module to frontend application config

'modules' => [
        'error' => [
            'class' => bl\cms\error\Module::className(),
            'webmasterEmail' => 'webmaster@test.com',
            'sendMailAutomatically' => true,
            'enableUserMessageSending' => false
        ],
],
'components' => [
        'errorHandler' => [
            'errorAction' => '/error/error/index',
        ],
        
        'errorHandler' => [
                    'errorAction' => '/error/error/index',
                ],
        
                'errorMailer' => [
                    'class' => yii\swiftmailer\Mailer::className(),
                    'useFileTransport' => false,
                    'messageConfig' => [
                        'charset' => 'UTF-8',
                    ],
                    'transport' => [
                        'class' => 'Swift_SmtpTransport',
                        'username' => $params['webmasterEmail'],
                        'password' => $params['webmasterEmailPassword'],
                        'host' => $params['emailHost'],
                        'port' => $params['emailPort'],
                        'encryption' => 'ssl', // if it is need
                    ],
                ],
]