@pstephan1187 Hello there :)
- You can find it at
vendor/laravel/framework/src/Illuminate/Foundation/Application.phpat line 820:
public function registerCoreContainerAliases()
{
$aliases = array(
// .. bunch more
'auth.password' => ['Illuminate\Auth\Passwords\PasswordBroker', 'Illuminate\Contracts\Auth\PasswordBroker'],
// .. and more
);
}
\2. It seems like the only occasion the PasswordBroker class is using the mailer is for sending a reset email. I don't see a reason why it won't use your configured mail provider. You can take a look at vendor/laravel/framework/src/Illuminate/Mail/MailServiceProvider.php and look in the method registerSwiftMailer() which calls to registerSwiftTransport() which eventually instantiate a TransportManager class. Taking a look at that class at: vendor/laravel/framework/src/Illuminate/Mail/TransportManager.php you can see that this class reads your configuration file.
Taking it further, you can take a look at vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordResetServiceProvider.php . Now look for the method registerPasswordBroker() which is at line 32. The method is well documented but I think what you are looking for is at line 48:
return new PasswordBroker(
$tokens, $users, $app['mailer'], $view
);
As you can see it resolves the mailer class from the IoC container (take a look above at the MailServiceProvider). You can implement your own PasswordBroker instance (make sure you implement the contracts needed) and simply replace it with your own implementation.