Skip to content

Firefly III: a personal finances manager

Catch common mail errors

James Cole07b58b42009e
diff --git a/app/Jobs/MailError.php b/app/Jobs/MailError.php
index 688a2ba15f..4d3cedadee 100644
--- a/app/Jobs/MailError.php
+++ b/app/Jobs/MailError.php
@@ -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);
}
}