Home > database >  Laravel - Sending mail not working, tinker hanging when trying to use sendmail via Laragon on Window
Laravel - Sending mail not working, tinker hanging when trying to use sendmail via Laragon on Window

Time:02-22

In facts I found this question: Laragon Send Mail Settings

Additionally, gmail disables "less secure apps" by default. Make sure your account has less secure apps enabled here too (or even better, use an Application Specific Password): https://myaccount.google.com/lesssecureapps

CodePudding user response:

output phpinfo() and check if you have the exact location define on sendmail_path

you also need to define it inside config/mail.php like

'sendmail' => [
    'transport' => 'sendmail',
    'path' => '/usr/sbin/sendmail -bs',
],

or pull the value from your .env file MAIL_SENDMAIL_PATH

'path' => env('MAIL_SENDMAIL_PATH')

Additionally, you may try using smtp driver with localhost info in your .env file, you can see these details in phpinfo() as well

MAIL_DRIVER=smtp
MAIL_HOST=localhost
MAIL_PORT=25
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_ENCRYPTION=null
  • Related