diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php
index ce3d4bbc744c9a8349be901f12e6c4dac0b7a3b2..9b706ce76ff5b964b76659dffc1e9d6ee49679c5 100644
--- a/server/lib/classes/monitor_tools.inc.php
+++ b/server/lib/classes/monitor_tools.inc.php
@@ -702,7 +702,7 @@ class monitor_tools {
 		$mailSubject = '';
 		$inHeader = true;
 		for($l = 0; $l < count($lines); $l++) {
-			if($lines[$l] == '') {
+			if(trim($lines[$l]) == '') {
 				$inHeader = false;
 				continue;
 			}