mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-26 16:26:35 -06:00
Catch common mail errors
This commit is contained in:
parent
8807f04599
commit
07b58b4200
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user