Skip to content

Commit 68a0dbe

Browse files
[8.x] Add option to set sendmail path. Fix default (laravel#5741)
* Add option to set sendmail path. Fix default Testing this in an application, it would seem that sendmail -bs is the wrong option for this case? What Laravel appears to do is pipe an RFC-2822 formatted message on STDIN and requires the sendmail emulation to deal with it, rather than -bs which initiates an SMTP session. if Exim is the default MTA then -t would seem to be the correct option. If you have an alternative installed instead of sendmail/exim, then there's no way to set the path, so I added MAIL_SENDMAIL_PATH so you can do, e.g.: MAIL_SENDMAIL_PATH="/usr/bin/msmtp -t --tls=off --from=${MAIL_FROM_ADDRESS} --auto-from=off" msmtp doesn't support -bs at all * Update mail.php Co-authored-by: Taylor Otwell <taylor@laravel.com>
1 parent 8a62ca2 commit 68a0dbe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

config/mail.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959

6060
'sendmail' => [
6161
'transport' => 'sendmail',
62-
'path' => '/usr/sbin/sendmail -bs',
62+
'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -t -i'),
6363
],
6464

6565
'log' => [

0 commit comments

Comments
 (0)