Skip to content

Firefly III: a personal finances manager

Sending of error email message is optional but enabled.

James Cole64364c3e772c
diff --git a/.env.example b/.env.example
index e8ebe3c838..1333892862 100755
--- a/.env.example
+++ b/.env.example
@@ -35,7 +35,7 @@ MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
SEND_REGISTRATION_MAIL=true
-
+SEND_ERROR_MESSAGE=true
SHOW_INCOMPLETE_TRANSLATIONS=false
ANALYTICS_ID=
diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php
index 4f9d8b6675..c8b15f984d 100755
--- a/app/Exceptions/Handler.php
+++ b/app/Exceptions/Handler.php
@@ -77,7 +77,8 @@ class Handler extends ExceptionHandler
*/
public function report(Exception $exception)
{
- if ($exception instanceof FireflyException || $exception instanceof ErrorException) {
+ $doMailError = env('SEND_ERROR_MESSAGE', true);
+ if (($exception instanceof FireflyException || $exception instanceof ErrorException) && $doMailError) {
$userData = [
'id' => 0,
'email' => '[email protected]',