diff --git a/Event.php b/Event.php
index <HASH>..<HASH> 100644
--- a/Event.php
+++ b/Event.php
@@ -587,11 +587,15 @@ class Event extends Component
      */
     protected function emailOutput(MailerInterface $mailer, $addresses)
     {
-        $mailer->compose()
-            ->setTextBody(file_get_contents($this->_output))
-            ->setSubject($this->getEmailSubject())
-            ->setTo($addresses)
-            ->send();
+        $textBody = file_get_contents($this->_output);
+
+        if (trim($textBody) != '' ) {
+            $mailer->compose()
+                ->setTextBody(file_get_contents($this->_output))
+                ->setSubject($this->getEmailSubject())
+                ->setTo($addresses)
+                ->send();
+        }
     }
 
     /**
Prevent sending of empty mails

When a task produces no output, no mail should be sent.