mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-18 18:44:16 +00:00
Catch common mail errors
This commit is contained in:
@@ -91,6 +91,15 @@ class MailError extends Job implements ShouldQueue
|
||||
}
|
||||
);
|
||||
} catch (Exception $e) { // intentional generic exception
|
||||
$message = $e->getMessage();
|
||||
if (str_contains($message, 'Bcc')) {
|
||||
Log::warning('[Bcc] Could not email or log the error. Please validate your email settings, use the .env.example file as a guide.');
|
||||
return;
|
||||
}
|
||||
if (str_contains($message, 'RFC 2822')) {
|
||||
Log::warning('[RFC] Could not email or log the error. Please validate your email settings, use the .env.example file as a guide.');
|
||||
return;
|
||||
}
|
||||
throw new FireflyException($e->getMessage(), 0, $e);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user