diff --git a/felamimail/inc/class.uidisplay.inc.php b/felamimail/inc/class.uidisplay.inc.php
index 43dc926c0c..d040fb7eb0 100644
--- a/felamimail/inc/class.uidisplay.inc.php
+++ b/felamimail/inc/class.uidisplay.inc.php
@@ -354,7 +354,8 @@
 				$this->t->set_var('charset',$GLOBALS['egw']->translation->charset());
 			}
 			// only notify when requested, notify flag (MDNSent/MDNnotSent) not set, and message not already seen (some servers do not support the MDNSent/MDNnotSent flag)
-			if ( $sent_not != "" && $this->bofelamimail->getNotifyFlags($this->uid,($flags?$flags:null)) === null && strpos( array2string($flags),'Seen')===false) {
+			if ( $sent_not != "" && $this->bofelamimail->getNotifyFlags($this->uid,($flags?$flags:null)) === null && strpos( array2string($flags),'Seen')===false)
+			{
 				$this->t->set_var('sentNotify','sendNotify("'.$this->uid.'");');
 				$this->t->set_var('lang_sendnotify',lang('The message sender has requested a response to indicate that you have read this message. Would you like to send a receipt?'));
 			} else {
diff --git a/felamimail/inc/class.uiwidgets.inc.php b/felamimail/inc/class.uiwidgets.inc.php
index 2852de8737..e8bcb0dcb5 100644
--- a/felamimail/inc/class.uiwidgets.inc.php
+++ b/felamimail/inc/class.uiwidgets.inc.php
@@ -1466,7 +1466,8 @@ $j(document).ready(function() {
 				$flags = $this->bofelamimail->getFlags($headerData['uid']);
 				if ($this->bofelamimail->getNotifyFlags($headerData['uid'],($flags?$flags:null)) === null)
 				{
-					$headers    = $this->bofelamimail->getMessageHeader($headerData['uid']);
+					$headers = $this->bofelamimail->getMessageHeader($headerData['uid']);
+					$sent_not = '';
 					if ( isset($headers['DISPOSITION-NOTIFICATION-TO']) ) {
 						$sent_not = $this->bofelamimail->decode_header(trim($headers['DISPOSITION-NOTIFICATION-TO']));
 					} else if ( isset($headers['RETURN-RECEIPT-TO']) ) {