diff --git a/app/Console/Commands/CheckData.php b/app/Console/Commands/CheckData.php index 002fa55749d3..e37fa165f3e7 100644 --- a/app/Console/Commands/CheckData.php +++ b/app/Console/Commands/CheckData.php @@ -74,16 +74,14 @@ class CheckData extends Command { $this->logMessage('Done'); $errorEmail = env('ERROR_EMAIL'); - if ( ! $this->isValid) { - if ($errorEmail) { - Mail::raw($this->log, function ($message) use ($errorEmail) { - $message->to($errorEmail) - ->from(CONTACT_EMAIL) - ->subject('Check-Data'); - }); - } else { - $this->info($this->log); - } + $this->info($this->log); + + if ( ! $this->isValid && $errorEmail) { + Mail::raw($this->log, function ($message) use ($errorEmail) { + $message->to($errorEmail) + ->from(CONTACT_EMAIL) + ->subject('Check-Data'); + }); } }