Adjust for mail server misconfiguration

This commit is contained in:
David Bomba 2025-02-04 15:00:01 +11:00
parent fd28457f13
commit 497716a193
1 changed files with 6 additions and 1 deletions

View File

@ -69,7 +69,12 @@ class UpdateUserLastLogin implements ShouldQueue
$nmo->company = $user->account->companies->first();
$nmo->settings = $user->account->companies->first()->settings;
$nmo->to_user = $user;
NinjaMailerJob::dispatch($nmo, true);
try{
NinjaMailerJob::dispatch($nmo, true);
} catch (\Exception $e) {
//this will catch for users that don't have their mail server configured correctly.
}
$user->ip = $ip;
$user->save();