Basil
200
2
Laravel

Sendmail not working with Auth().

Posted 5 months ago by Basil

Hi everyone,

I am having an issue with sendmail/Auth(). I have set up sendmail and configured it and it works perfectly. I can easily send email from any part of my application by simply using the following code:

mail(“[email protected], “Subject”, “Email message”, “From: [email protected]”);

The problem I am having is that sendmail doesn’t seem to work with Auth(). So if a user clicks on Forgot Your Password and enters their email address when they click Send Password Reset Link it does not work. The page just goes into a continuous loop and I am not getting any errors in the console or any feedback at all in the console. I know sendmail works as it works perfectly everywhere else within the application it just doesn’t work with Auth(). I know I am probably missing some silly setting somewhere but I am drawing a blank here. Below are the setting I am using in my environment file and my mail config.php file. Any ideas or suggestion greatly appreciated.

.env

MAIL_DRIVER=sendmail
MAIL_SENDMAIL='C:\sendmail\sendmail.exe -bs'


config/mail.php

    /*
    |--------------------------------------------------------------------------
    | Sendmail System Path
    |--------------------------------------------------------------------------
    |
    | When using the "sendmail" driver to send e-mails, we will need to know
    | the path to where Sendmail lives on this server. A default path has
    | been provided here, which will work well on most of your systems.
    |
    */

    'sendmail' => 'C:\sendmail\sendmail.exe -bs',

Please sign in or create an account to participate in this conversation.