mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Catch Swift exceptions and do a log only (instead of crashing) because the email message isn't actually critical.
This commit is contained in:
parent
66a4042cad
commit
e3b6057bf8
@ -182,11 +182,15 @@ class AuthController extends Controller
|
||||
$email = Auth::user()->email;
|
||||
$address = route('index');
|
||||
// send email.
|
||||
Mail::send(
|
||||
['emails.registered-html', 'emails.registered'], ['address' => $address], function (Message $message) use ($email) {
|
||||
$message->to($email, $email)->subject('Welcome to Firefly III! ');
|
||||
try {
|
||||
Mail::send(
|
||||
['emails.registered-html', 'emails.registered'], ['address' => $address], function (Message $message) use ($email) {
|
||||
$message->to($email, $email)->subject('Welcome to Firefly III! ');
|
||||
}
|
||||
);
|
||||
} catch(\Swift_TransportException $e) {
|
||||
Log::error($e->getMessage());
|
||||
}
|
||||
);
|
||||
|
||||
// set flash message
|
||||
Session::flash('success', 'You have registered successfully!');
|
||||
|
Loading…
Reference in New Issue
Block a user