X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/bae0e80cee6acf111c7b69568ced4a8b5ce0c72d..refs/pull/5721/head:/app/Config/mail.php diff --git a/app/Config/mail.php b/app/Config/mail.php index e8ec9cc15..7256ce884 100644 --- a/app/Config/mail.php +++ b/app/Config/mail.php @@ -11,6 +11,7 @@ // Configured mail encryption method. // STARTTLS should still be attempted, but tls/ssl forces TLS usage. $mailEncryption = env('MAIL_ENCRYPTION', null); +$mailPort = intval(env('MAIL_PORT', 587)); return [ @@ -22,7 +23,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'), ], @@ -31,14 +32,15 @@ return [ 'mailers' => [ 'smtp' => [ 'transport' => 'smtp', - 'scheme' => ($mailEncryption === 'tls' || $mailEncryption === 'ssl') ? 'smtps' : null, + 'scheme' => null, 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), - 'port' => env('MAIL_PORT', 587), + 'port' => $mailPort, 'username' => env('MAIL_USERNAME'), 'password' => env('MAIL_PASSWORD'), 'verify_peer' => env('MAIL_VERIFY_SSL', true), 'timeout' => null, - 'local_domain' => env('MAIL_EHLO_DOMAIN'), + 'local_domain' => null, + 'require_tls' => ($mailEncryption === 'tls' || $mailEncryption === 'ssl' || $mailPort === 465), ], 'sendmail' => [ @@ -63,12 +65,4 @@ return [ ], ], ], - - // Email markdown configuration - 'markdown' => [ - 'theme' => 'default', - 'paths' => [ - resource_path('views/vendor/mail'), - ], - ], ];