I am working on a laravel 5 application. I recently hosted it on shared server and tried to reset the password. It is throwing the following exception.
Swift_TransportException in StreamBuffer.php line 265: Connection could not be established with host mailtrap.io [Connection timed out #110]
I am using default authentication driver.
The code in the Password controller is as 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
|--------------------------------------------------------------------------
|
| This controller is responsible for handling password reset requests
| and uses a simple trait to include this behavior. You're free to
| explore this trait and override any methods you wish to tweak.
|
*/
use ResetsPasswords;
/**
* Create a 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 I solve this problem?
in config/mail.php set 'encryption' => 'tls', or set port' => 587,
"Also know that Mailtrap.io is a fake SMTP server for development teams to test, view and share emails sent from the development and staging environments without spamming real customers"
you are getting this error because the default value set in your .env file located in the root of your project has these values
change them according to your requirement and if these values are set correctly then change the values of config/mail.php
by