mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 23:45:10 +00: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:
@@ -182,11 +182,15 @@ class AuthController extends Controller
|
|||||||
$email = Auth::user()->email;
|
$email = Auth::user()->email;
|
||||||
$address = route('index');
|
$address = route('index');
|
||||||
// send email.
|
// send email.
|
||||||
Mail::send(
|
try {
|
||||||
['emails.registered-html', 'emails.registered'], ['address' => $address], function (Message $message) use ($email) {
|
Mail::send(
|
||||||
$message->to($email, $email)->subject('Welcome to Firefly III! ');
|
['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
|
// set flash message
|
||||||
Session::flash('success', 'You have registered successfully!');
|
Session::flash('success', 'You have registered successfully!');
|
||||||
|
Reference in New Issue
Block a user