From 01e9c22695a3e495f07ab445750221af72e09fe4 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Wed, 5 Sep 2018 13:40:03 +0200 Subject: Implemented mailing abstraction Closes #434 --- config/app.php | 13 +++++++++++++ config/config.default.php | 20 ++++++++++++++++++-- 2 files changed, 31 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/app.php b/config/app.php index e309abe4..efe745e8 100644 --- a/config/app.php +++ b/config/app.php @@ -5,9 +5,13 @@ return [ // Service providers 'providers' => [ + + // Application bootstrap \Engelsystem\Logger\LoggerServiceProvider::class, \Engelsystem\Exceptions\ExceptionsServiceProvider::class, \Engelsystem\Config\ConfigServiceProvider::class, + + // Request handling \Engelsystem\Http\UrlGeneratorServiceProvider::class, \Engelsystem\Renderer\RendererServiceProvider::class, \Engelsystem\Database\DatabaseServiceProvider::class, @@ -19,13 +23,22 @@ return [ \Engelsystem\Renderer\TwigServiceProvider::class, \Engelsystem\Middleware\RouteDispatcherServiceProvider::class, \Engelsystem\Middleware\RequestHandlerServiceProvider::class, + + // Additional services + \Engelsystem\Mail\MailerServiceProvider::class, ], // Application middleware 'middleware' => [ + + // Basic initialization \Engelsystem\Middleware\SendResponseHandler::class, \Engelsystem\Middleware\ExceptionHandler::class, + + // Changes of request/response parameters \Engelsystem\Middleware\SetLocale::class, + + // The application code \Engelsystem\Middleware\ErrorHandler::class, \Engelsystem\Middleware\RouteDispatcher::class, \Engelsystem\Middleware\RequestHandler::class, diff --git a/config/config.default.php b/config/config.default.php index 0328e500..795ad1b7 100644 --- a/config/config.default.php +++ b/config/config.default.php @@ -26,8 +26,24 @@ return [ // Contact email address, linked on every page 'contact_email' => 'mailto:ticket@c3heaven.de', - // From address of all emails - 'no_reply_email' => 'noreply@engelsystem.de', + // Email config + 'email' => [ + // Can be mail, smtp, sendmail or log + 'driver' => env('MAIL_DRIVER', 'smtp'), + 'from' => [ + // From address of all emails + 'address' => env('MAIL_FROM_ADDRESS', 'noreply@engelsystem.de'), + 'name' => env('MAIL_FROM_NAME', 'Engelsystem') + ], + + 'host' => env('MAIL_HOST', 'localhost'), + 'port' => env('MAIL_PORT', 587), + // Transport encryption like tls + 'encryption' => env('MAIL_ENCRYPTION', null), + 'username' => env('MAIL_USERNAME'), + 'password' => env('MAIL_PASSWORD'), + 'sendmail' => '/usr/sbin/sendmail -bs', + ], // Default theme, 1=style1.css 'theme' => 1, -- cgit v1.2.3-54-g00ecf