function ToggleMDNflag ( $set ) {
global $imapConnection, $passed_id, $mailbox;
sqimap_mailbox_select($imapConnection, $mailbox);
-
$sg = $set?'+':'-';
$cmd = 'STORE ' . $passed_id . ' ' . $sg . 'FLAGS ($MDNSent)';
$read = sqimap_run_command ($imapConnection, $cmd, true, $response,
$rem_attachments = array();
foreach ($attachments as $info) {
- if ($info->session == -1) {
+ if ($info['session'] == -1) {
$attached_file = "$hashed_attachment_dir/$info[localfilename]";
if (file_exists($attached_file)) {
unlink($attached_file);
/**
* What do we reply to -- text only, if possible
*/
-$ent_num = findDisplayEntity($message);
+
+$body = '';
+
+/* experimental */
+/*
+if ($message->header->type0 == 'multipart' && $message->header->type1 == 'digest') {
+ listEntities($message);
+ for ($i = 0; $i < count($message->entities); $i++) {
+
+ $msg = $message->entities[$i];
+ $body .= $msg->header->type0 .'/'.$msg->header->type1 .'<BR>';
+
+ $msg->header->type0 = 'message';
+ $msg->header->type1 = 'rfc822';
+ $ent_ar = findDisplayEntity($msg, false);
+ for ($i = 0; $i < count($ent_ar); $i++) {
+ $body .= formatBody($imapConnection, $msg, $color, $wrap_at, $ent_ar[$i]);
+ }
+ $i++;
+ }
+} else {
+*/
+ $ent_ar = findDisplayEntity($message, false);
+ $i = 0;
+ for ($i = 0; $i < count($ent_ar); $i++) {
+ $body .= formatBody($imapConnection, $message, $color, $wrap_at, $ent_ar[$i]);
+ }
+/*
+}
+*/
+
+/* first step in displaying multiple entities */
+$ent_ar = findDisplayEntity($message,true);
+$ent_num = $ent_ar[0];
+for ($i = 1 ; $i < count($ent_ar); $i++) {
+ $ent_num .= '_'.$ent_ar[$i];
+}
/** TEXT STRINGS DEFINITIONS **/
$echo_more = _("more");
$echo_less = _("less");
"identity=$identity&send_to=$url_to_string&".
"send_to_cc=$url_cc_string&send_to_bcc=$url_bcc_string&".
"subject=$url_subj&mailprio=$priority_level&".
- "draft_id=$passed_id&ent_num=$ent_num&passed_id=$passed_id";
+ "draft_id=$passed_id&ent_num=$ent_num";
if ($compose_new_win == '1') {
echo "<a href=\"javascript:void(0)\" onclick=\"comp_in_new(false,'$comp_uri')\"";
$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) &&
" if (window.confirm(\"" .
_("The message sender has requested a response to indicate that you have read this message. Would you like to send a receipt?") .
"\")) { \n" .
- " window.location=($url); \n" .
- ' window.location.reload()' . "\n" .
+ ' window.open('.$url.',"right");' . "\n" .
' }' . "\n" .
'// -->' . "\n" .
'</script>' . "\n";
if ( SendMDN( $MDN_to, $final_recipient ) > 0 && $supportMDN ) {
ToggleMDNflag( true);
}
+ ClearAttachments();
}
$sendreceipt = 'removeMDN';
$url = "\"read_body.php?mailbox=$mailbox&passed_id=$passed_id&startMessage=$startMessage&show_more=$show_more&sendreceipt=$sendreceipt\"";
' </TD></TR>' .
'</TABLE>';
flush();
-
echo "<TABLE CELLSPACING=0 WIDTH=\"97%\" BORDER=0 ALIGN=CENTER CELLPADDING=0>\n" .
" <TR><TD BGCOLOR=\"$color[4]\" WIDTH=\"100%\">\n" .
- '<BR>'.
- formatBody($imapConnection, $message, $color, $wrap_at).
- '</TD></TR></TABLE>' .
+ '<BR>';
+echo $body;
+
+echo '</TD></TR></TABLE>' .
'<TABLE CELLSPACING="0" WIDTH="100%" BORDER="0" ALIGN="CENTER" CELLPADDING="0">' . "\n" .
" <TR><TD BGCOLOR=\"$color[9]\"> </TD></TR>" .
'</TABLE>' . "\n";