Skip to content

Firefly III: a personal finances manager

Code for #1733

James Colea5a012738e7d
diff --git a/.env.docker b/.env.docker
index 381c961798..e492ce875e 100644
--- a/.env.docker
+++ b/.env.docker
@@ -74,6 +74,9 @@ SPARKPOST_SECRET=${SPARKPOST_SECRET}
SEND_REGISTRATION_MAIL=true
SEND_ERROR_MESSAGE=false
+# These messages contain (sensitive) transaction information:
+SEND_REPORT_JOURNALS=${SEND_REPORT_JOURNALS}
+
# Set a Mapbox API key here (see mapbox.com) so there might be a map available at various places.
MAPBOX_API_KEY=${MAPBOX_API_KEY}
diff --git a/.env.example b/.env.example
index b8c33e380e..e53df1a9ca 100644
--- a/.env.example
+++ b/.env.example
@@ -74,6 +74,9 @@ SPARKPOST_SECRET=
SEND_REGISTRATION_MAIL=true
SEND_ERROR_MESSAGE=true
+# These messages contain (sensitive) transaction information:
+SEND_REPORT_JOURNALS=true
+
# Set a Mapbox API key here (see mapbox.com) so there might be a map available at various places.
MAPBOX_API_KEY=
diff --git a/.env.heroku b/.env.heroku
index c16376ea76..c4db28823b 100644
--- a/.env.heroku
+++ b/.env.heroku
@@ -73,6 +73,8 @@ SPARKPOST_SECRET=
# Firefly III can send you the following messages
SEND_REGISTRATION_MAIL=true
SEND_ERROR_MESSAGE=true
+# These messages contain (sensitive) transaction information:
+SEND_REPORT_JOURNALS=true
# Set a Mapbox API key here (see mapbox.com) so there might be a map available at various places.
MAPBOX_API_KEY=
diff --git a/.env.sandstorm b/.env.sandstorm
index ce73089fe8..aa7b70b1ff 100755
--- a/.env.sandstorm
+++ b/.env.sandstorm
@@ -73,6 +73,8 @@ SPARKPOST_SECRET=
# Firefly III can send you the following messages
SEND_REGISTRATION_MAIL=true
SEND_ERROR_MESSAGE=true
+# These messages contain (sensitive) transaction information:
+SEND_REPORT_JOURNALS=true
# Set a Mapbox API key here (see mapbox.com) so there might be a map available at various places.
MAPBOX_API_KEY=
diff --git a/.env.testing b/.env.testing
index 224ed8711a..67757f6e23 100644
--- a/.env.testing
+++ b/.env.testing
@@ -73,6 +73,8 @@ SPARKPOST_SECRET=
# Firefly III can send you the following messages
SEND_REGISTRATION_MAIL=true
SEND_ERROR_MESSAGE=false
+# These messages contain (sensitive) transaction information:
+SEND_REPORT_JOURNALS=true
# Set a Mapbox API key here (see mapbox.com) so there might be a map available at various places.
MAPBOX_API_KEY=
diff --git a/app/Handlers/Events/AutomationHandler.php b/app/Handlers/Events/AutomationHandler.php
index 2b1464010c..75d04fbc2d 100644
--- a/app/Handlers/Events/AutomationHandler.php
+++ b/app/Handlers/Events/AutomationHandler.php
@@ -45,6 +45,12 @@ class AutomationHandler
*/
public function reportJournals(RequestedReportOnJournals $event): bool
{
+ $sendReport = envNonEmpty('SEND_REPORT_JOURNALS', true);
+
+ if (false === $sendReport) {
+ return true;
+ }
+
Log::debug('In reportJournals.');
/** @var UserRepositoryInterface $repository */
$repository = app(UserRepositoryInterface::class);