Laravel 5, Password reset email not working -
i working on laravel 5 application. hosted on shared server , tried reset password. throwing following exception.
swift_transportexception in streambuffer.php line 265: connection not established host mailtrap.io [connection timed out #110]
i using default authentication driver.
the code in password controller follows:
<?php namespace app\http\controllers\auth; use app\http\controllers\controller; use illuminate\contracts\auth\guard; use illuminate\contracts\auth\passwordbroker; use illuminate\foundation\auth\resetspasswords; class passwordcontroller extends controller { /* |-------------------------------------------------------------------------- | password reset controller |-------------------------------------------------------------------------- | | controller responsible handling password reset requests | , uses simple trait include behavior. you're free | explore trait , override methods wish tweak. | */ use resetspasswords; /** * create new password controller instance. * * @param \illuminate\contracts\auth\guard $auth * @param \illuminate\contracts\auth\passwordbroker $passwords * @return void */ public function __construct(guard $auth, passwordbroker $passwords) { $this->auth = $auth; $this->passwords = $passwords; $this->middleware('guest'); } }
how can solve problem?
you getting error because default value set in .env file located in root of project has these values
mail_driver=smtp mail_host=mailtrap.io mail_port=2525 mail_username=null mail_password=null
change them according requirement , if these values set correctly change values of config/mail.php
'driver' => env('mail_driver', 'smtp'),
by
'driver' => env('mail_driver', 'mail'),
Comments
Post a Comment