]> BookStack Code Mirror - bookstack/blob - app/Config/mail.php
Mail: Removed custom symfony/mailer fork
[bookstack] / app / Config / mail.php
1 <?php
2
3 /**
4  * Mail configuration options.
5  *
6  * Changes to these config files are not supported by BookStack and may break upon updates.
7  * Configuration should be altered via the `.env` file or environment variables.
8  * Do not edit this file unless you're happy to maintain any changes yourself.
9  */
10
11 // Configured mail encryption method.
12 // STARTTLS should still be attempted, but tls/ssl forces TLS usage.
13 $mailEncryption = env('MAIL_ENCRYPTION', null);
14 $mailPort = intval(env('MAIL_PORT', 587));
15
16 return [
17
18     // Mail driver to use.
19     // From Laravel 7+ this is MAIL_MAILER in laravel.
20     // Kept as MAIL_DRIVER in BookStack to prevent breaking change.
21     // Options: smtp, sendmail, log, array
22     'default' => env('MAIL_DRIVER', 'smtp'),
23
24     // Global "From" address & name
25     'from' => [
26         'address' => env('MAIL_FROM', '[email protected]'),
27         'name'    => env('MAIL_FROM_NAME', 'BookStack'),
28     ],
29
30     // Mailer Configurations
31     // Available mailing methods and their settings.
32     'mailers' => [
33         'smtp' => [
34             'transport' => 'smtp',
35             'scheme' => null,
36             'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
37             'port' => $mailPort,
38             'username' => env('MAIL_USERNAME'),
39             'password' => env('MAIL_PASSWORD'),
40             'verify_peer' => env('MAIL_VERIFY_SSL', true),
41             'timeout' => null,
42             'local_domain' => null,
43             'require_tls' => ($mailEncryption === 'tls' || $mailEncryption === 'ssl' || $mailPort === 465),
44         ],
45
46         'sendmail' => [
47             'transport' => 'sendmail',
48             'path' => env('MAIL_SENDMAIL_COMMAND', '/usr/sbin/sendmail -bs'),
49         ],
50
51         'log' => [
52             'transport' => 'log',
53             'channel' => env('MAIL_LOG_CHANNEL'),
54         ],
55
56         'array' => [
57             'transport' => 'array',
58         ],
59
60         'failover' => [
61             'transport' => 'failover',
62             'mailers' => [
63                 'smtp',
64                 'log',
65             ],
66         ],
67     ],
68 ];