I have tested a password reset feature on Laravel 5.5 using mailtrap.io.
I use these credentials in the .env
file:
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=**
MAIL_PASSWORD=**
MAIL_ENCRYPTION=null
Auth=PLAIN
It works okay. However, I now need to deploy it to an Ubuntu server which already has a configured sendmail
package, but what settings do I need to include in the .env
file?
The docs does mention sendmail, but what's an example set of settings?
for using sendmail drivers you need to set driver parameter in your .env
file
i.e.
#.env
...
MAIL_DRIVER=sendmail
MAIL_SENDMAIL='/your/sendmail/path -with -parameters'
...
rest of the configurations are set in sendmail
P.S. make sure your sendmail path is same as the default /usr/sbin/sendmail -bs
or also provide that in .env
file and change this in config/mail.php
'sendmail' => env('MAIL_SENDMAIL', '/usr/sbin/sendmail -bs')