<?php

	$headers = $this->messageArray['headers'];

	//TODO: fix QUICKFIX:appears that some microsoft "read Reciepts" have strange mime structure. gracefully return if trying to render a meader block for a mime part that does not exist.
	if( !is_array($headers) ){
		return;
	}
	
	$from = htmlentities( $headers['from'] . '>', ENT_QUOTES, 'UTF-8' );
	$to = htmlentities($headers['to'], ENT_QUOTES, 'UTF-8' );
	$cc = array_key_exists('cc', $headers)?htmlentities($headers['cc'], ENT_QUOTES, 'UTF-8' ):'';
	$sent = array_key_exists('dateraw', $headers) ? htmlentities($headers['dateraw'], null, 'UTF-8') : '';
	$subject = htmlentities($headers['subject'], ENT_QUOTES, 'UTF-8');

?>
<div id="inlineMessageFromField" style="width:500px; display: inline; background: rgb(228, 228, 228);">
	<div style="display: inline; font-weight:bold;"><?php echo $this->translate('From:') ?></div><?php echo $from ?>
</div>
<br />
<div id="inlineMessageToField" style="display: inline; font-weight:bold;"><?php echo $this->translate('To:')?></div><?php echo $to ?>
<br /> 
<div id="inlineMessageSentField" style="display: inline; font-weight:bold;"><?php echo $this->translate('Cc:') ?></div><?php echo $cc ?>
<br />
<div id="inlineMessageSentField" style="display: inline; font-weight:bold;"><?php echo $this->translate('Sent:') ?></div><?php echo $sent ?>
<br /> 
<div id="inlineMessageSubjectField" style="display: inline; font-weight:bold;"><?php echo $this->translate('Subject:') ?></div><?php echo $subject ?>
<br />
<br />
