X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/f2293a70f80a13231aea07c1fc24f14f3fc393f9..refs/pull/5280/head:/app/Config/mail.php diff --git a/app/Config/mail.php b/app/Config/mail.php index 6cd5ee28f..2906d769a 100644 --- a/app/Config/mail.php +++ b/app/Config/mail.php @@ -8,6 +8,10 @@ * Do not edit this file unless you're happy to maintain any changes yourself. */ +// Configured mail encryption method. +// STARTTLS should still be attempted, but tls/ssl forces TLS usage. +$mailEncryption = env('MAIL_ENCRYPTION', null); + return [ // Mail driver to use. @@ -18,7 +22,7 @@ return [ // Global "From" address & name 'from' => [ - 'address' => env('MAIL_FROM', 'mail@bookstackapp.com'), + 'address' => env('MAIL_FROM', 'bookstack@example.com'), 'name' => env('MAIL_FROM_NAME', 'BookStack'), ], @@ -27,14 +31,15 @@ return [ 'mailers' => [ 'smtp' => [ 'transport' => 'smtp', + 'scheme' => null, 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), 'port' => env('MAIL_PORT', 587), - 'encryption' => env('MAIL_ENCRYPTION', 'tls'), 'username' => env('MAIL_USERNAME'), 'password' => env('MAIL_PASSWORD'), - 'verify_peer' => env('MAIL_VERIFY_PEER', true), + 'verify_peer' => env('MAIL_VERIFY_SSL', true), 'timeout' => null, 'local_domain' => env('MAIL_EHLO_DOMAIN'), + 'tls_required' => ($mailEncryption === 'tls' || $mailEncryption === 'ssl'), ], 'sendmail' => [