From 72da6dce078d9286908725a9bf5380c5d49b1d03 Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Tue, 12 Sep 2023 12:17:12 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=E2=9C=89=20=E2=80=94=20Allow=20to=20u?= =?UTF-8?q?se=20sendmail?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 4 +++- config/mail.php | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.env b/.env index 752c207..081f0d6 100644 --- a/.env +++ b/.env @@ -52,7 +52,7 @@ MAINTENANCE_MODE=false DB_CONNECTION=sqlite #Mail Settings=LinkStack comes with a free to use built-in SMTP server for sending mail. You can leave this setting as is, if you wish to use this service please read our terms and conditions at llc-mail.tru.io. If you do not wish to use the built-in SMTP server, change the setting below. -#=MAIL_MAILER either smtp or built-in. Make sure to change this setting if you want to add a custom SMTP server. +#=MAIL_MAILER either smtp, sendmail or built-in. Make sure to change this setting if you want to add a custom SMTP server or use sendmail. MAIL_MAILER=built-in MAIL_HOST= MAIL_PORT= @@ -61,6 +61,8 @@ MAIL_PASSWORD= MAIL_ENCRYPTION= MAIL_FROM_ADDRESS= MAIL_FROM_NAME="${APP_NAME}" +#= Set the path to sendmail binary and set options. Default is /usr/sbin/sendmail -bs +MAIL_SENDMAIL= #Cache Settings=Completely optional. MEMCACHED_HOST=127.0.0.1 diff --git a/config/mail.php b/config/mail.php index bdd014e..074c767 100755 --- a/config/mail.php +++ b/config/mail.php @@ -34,6 +34,14 @@ return [ */ 'mailers' => [ + 'sendmail' => [ + 'transport' => 'sendmail', + 'path' => env('MAIL_SENDMAIL', '/usr/sbin/sendmail -bs'), + 'from' => [ + 'address' => env('MAIL_FROM_ADDRESS'), + 'name' => env('MAIL_FROM_NAME'), + ] + ], 'smtp' => [ 'transport' => 'smtp', 'host' => env('MAIL_HOST'),