' .
+ '' . "\n" .
+ '' . "\n";
+
+/** subject **/
+echo "\n" .
+ _("Subject:") .
+ " | \n" .
+ "$subject \n" .
+ " | \n" .
+ ''.
+ '" . _("View Full Header") . "\n";
+} else {
+ echo "startMessage=$startMessage&show_more=$show_more&view_hdr=1\">" .
+ _("View Full Header") . "\n";
+}
+
+/* Output the printer friendly link if we are in subtle mode. */
+if ($pf_subtle_link) {
+ echo printer_friendly_link(true);
+}
+
+do_hook("read_body_header_right");
+echo ' | ' .
+ ' ';
+
+/** from **/
+echo '' .
+ '' .
+ _("From:") .
+ ' | ' .
+ "$from_name \n" .
+ ' | ' .
+ ' ';
+/** date **/
+echo '' . "\n" .
+ '' . "\n" .
+ _("Date:") .
+ " | \n" .
+ "$dateString \n" .
+ ' | ' . "\n" .
+ ' ' . "\n";
+
+/** to **/
+echo "\n" .
+ "\n" .
+ _("To:") .
+ ' | ' . "\n" .
+ "$to_string \n" .
+ ' | ' . "\n" .
+ ' ' . "\n";
+/** cc **/
+if (isset($cc_string)) {
+ echo '' .
+ "" .
+ 'Cc:' .
+ " | " .
+ "$cc_string " .
+ ' | ' .
+ ' ' . "\n";
+}
+
+/** bcc **/
+if (isset($bcc_string)) {
+ echo ''.
+ "" .
+ 'Bcc:' .
+ " | " .
+ "$bcc_string " .
+ ' | ' .
+ ' ' . "\n";
+}
+if ($default_use_priority) {
+ if (isset($priority_string)) {
+ echo '' .
+ "" .
+ _("Priority") . ': '.
+ " | " .
+ "$priority_string " .
+ ' | ' .
+ " " . "\n";
+ }
+}
+
+if ($show_xmailer_default) {
+ $read = sqimap_run_command ($imapConnection, "FETCH $passed_id BODY.PEEK[HEADER.FIELDS (X-Mailer User-Agent)]", true,
+ $response, $readmessage);
+ $mailer = substr($read[1], strpos($read[1], " "));
+ if (trim($mailer)) {
+ echo '' .
+ "" .
+ _("Mailer") . ': '.
+ " | " .
+ "$mailer " .
+ ' | ' .
+ " " . "\n";
+ }
+}
+
+/* Output the printer friendly link if we are not in subtle mode. */
+if (!$pf_subtle_link) {
+ echo printer_friendly_link(true);
+}
+
+if ($default_use_mdn) {
+ if ($mdn_user_support) {
+
+ // debug gives you the capability to remove mdn-flags
+ $debug = false;
+ $read = sqimap_run_command ($imapConnection, "FETCH $passed_id BODY.PEEK[HEADER.FIELDS (Disposition-Notification-To)]", true,
+ $response, $readmessage);
+ $MDN_to = substr($read[1], strpos($read[1], ' '));
+ $MDN_flag_present = false;
+
+ $read = sqimap_run_command ($imapConnection, "FETCH $passed_id FLAGS", true,
+ $response, $readmessage);
+
+ $MDN_flag_present = preg_match( '/.*\$MDNSent/i', $read[0]);
+
+ if (trim($MDN_to) &&
+ (!isset( $sendreceipt ) || $sendreceipt == '' ) ) {
+
+ if ( $MDN_flag_present && $supportMDN) {
+ $sendreceipt = 'removeMDN';
+ $url = "\"read_body.php?mailbox=$mailbox&passed_id=$passed_id&startMessage=$startMessage&show_more=$show_more&sendreceipt=$sendreceipt\"";
+ $sendreceipt="";
+ if ($debug ) {
+ echo '' .
+ "" .
+ _("Read receipt") . ': ' .
+ " | " .
+ '' .
+ _("send") .
+ " [" . _("Remove MDN flag") . '] ' .
+ ' | ' .
+ ' ' . "\n";
+ } else {
+ echo '' .
+ "" .
+ _("Read receipt") . ': ' .
+ " | " .
+ ''._("send").''.
+ ' | ' .
+ ' ' . "\n";
+ }
+
+ } // when deleted or draft flag is set don't offer to send a MDN response
+ else if ( ereg('Draft',$read[0] || ereg('Deleted',$read[0])) ) {
+ echo '' .
+ "" .
+ _("Read receipt") . ': '.
+ " | " .
+ '' . _("requested") . "" .
+ ' | ' .
+ ' ' . "\n";
+ }
+ // if no MDNsupport don't use the annoying popup messages
+ else if ( !$FirstTimeSee ) {
+ $sendreceipt = 'send';
+ $url = "\"read_body.php?mailbox=$mailbox&passed_id=$passed_id&startMessage=$startMessage&show_more=$show_more&sendreceipt=$sendreceipt\"";
+ echo '' .
+ "" .
+ _("Read receipt") . ': ' .
+ " | " .
+ '' . _("requested") .
+ " [" . _("Send read receipt now") . "]" .
+ ' | ' .
+ ' ' . "\n";
+ $sendreceipt='';
}
- } else if ($i == 1) {
- $cc_string = "$cc_string ($echo_less)";
- }
- }
- }
-
- /** make sure everything will display in HTML format **/
- $from_name = htmlspecialchars($message["HEADER"]["FROM"]);
- $subject = htmlspecialchars(stripslashes($message["HEADER"]["SUBJECT"]));
-
- echo " ";
- echo "\n";
- echo " ";
- echo " ";
- echo " | ";
- echo " ";
- echo " \n";
- echo " \n";
- /** subject **/
- echo " \n";
- echo " ";
- echo _("Subject:");
- echo "\n";
- echo " | \n";
- echo " $subject\n";
- echo " | \n";
- echo " \n";
- /** from **/
- echo " \n";
- echo " \n";
- echo " ";
- echo _("From:");
- echo "\n";
- echo " | \n";
- echo " $from_name\n";
- echo " | \n";
- echo " \n";
- /** date **/
- echo " \n";
- echo " \n";
- echo " ";
- echo _("Date:");
- echo "\n";
- echo " | \n";
- echo " $dateString\n";
- echo " | \n";
- echo " \n";
- /** to **/
- echo " \n";
- echo " \n";
- echo " ";
- echo _("To:");
- echo "\n";
- echo " | \n";
- echo " $to_string\n";
- echo " | \n";
- echo " \n";
- /** cc **/
- if ($message["HEADER"]["CC"][0]) {
- echo " \n";
- echo " \n";
- echo " Cc:\n";
- echo " | \n";
- echo " $cc_string\n";
- echo " | \n";
- echo " \n";
- }
- echo " ";
- echo " | ";
-
- echo " \n";
- $body = formatBody($message, $color, $wrap_at);
- echo " ";
-
- echo "$body";
-
- echo " | \n";
- echo " | ";
- echo " \n";
+ else {
+ $sendreceipt = 'send';
+ $url = "\"read_body.php?mailbox=$mailbox&passed_id=$passed_id&startMessage=$startMessage&show_more=$show_more&sendreceipt=$sendreceipt\"";
+ if ($javascript_on) {
+ echo "' . "\n";
+ }
+ echo '' .
+ "" .
+ _("Read receipt") . ': ' .
+ " | " .
+ '' . _("requested") . "  " . '[' .
+ _("Send read receipt now") . '] ' ." \n" .
+ ' | ' .
+ ' ' . "\n";
+ $sendreceipt = '';
+ }
+ }
+
+ if ( !isset( $sendreceipt ) || $sendreceipt == '' ) {
+ } else if ( $sendreceipt == 'send' ) {
+ if ( !$MDN_flag_present) {
+ if (isset($identity) ) {
+ $final_recipient = getPref($data_dir, $username, 'email_address' . '0', '' );
+ } else {
+ $final_recipient = getPref($data_dir, $username, 'email_address', '' );
+ }
+
+ $final_recipient = trim($final_recipient);
+ if ($final_recipient == '' ) {
+ $final_recipient = getPref($data_dir, $username, 'email_address', '' );
+ }
+
+ if ( SendMDN( $MDN_to, $final_recipient ) > 0 && $supportMDN ) {
+ ToggleMDNflag( true);
+ }
+ }
+ $sendreceipt = 'removeMDN';
+ $url = "\"read_body.php?mailbox=$mailbox&passed_id=$passed_id&startMessage=$startMessage&show_more=$show_more&sendreceipt=$sendreceipt\"";
+ $sendreceipt="";
+
+ if ($debug && $supportMDN) {
+ echo " \n" .
+ " \n" .
+ " "._("Read receipt").": \n".
+ " | \n" .
+ ' '._("send").''." " . '[' . _("Remove MDN flag") . '] ' . "\n" .
+ ' | ' . "\n" .
+ ' ' . "\n";
+ } else {
+ echo " \n" .
+ " \n" .
+ " "._("Read receipt").": \n".
+ " | \n" .
+ ' '._("send").''. "\n" .
+ ' | ' . "\n" .
+ ' ' . "\n";
+ }
+ }
+ elseif ($sendreceipt == 'removeMDN' ) {
+ ToggleMDNflag ( false );
+
+ $sendreceipt = 'send';
+ $url = "\"read_body.php?mailbox=$mailbox&passed_id=$passed_id&startMessage=$startMessage&show_more=$show_more&sendreceipt=$sendreceipt\"";
+ echo ''.
+ "" .
+ _("Read receipt") . ': ' .
+ " | " .
+ '' . _("requested") .
+ " [" . _("Send read receipt now") . "]" .
+ ' | ' .
+ ' ' . "\n";
+ $sendreceipt = '';
+
+ }
+ }
+}
+
+do_hook('read_body_header');
+
+echo ' ' .
+ ' |
' .
+ '