if ($forward_id)
$id = $forward_id;
- else if ($reply_id)
+ elseif ($reply_id)
$id = $reply_id;
$body = ereg_replace('\\\\', '\\\\', $body);
- sqimap_mailbox_close($imapConnection);
return;
}
// Write Attachment to file
$fp = fopen ($attachment_dir.$localfilename, "w");
fputs ($fp, decodeBody(mime_fetch_body($imapConnection, $forward_id, $message->header->entity_id), $message->header->encoding));
- fgets($imapConnection, 256);
- fgets($imapConnection, 256);
- fclose ($fp);
+
+// Don't know why these lines were included
+// fgets($imapConnection, 256);
+// fgets($imapConnection, 256);
+ fclose ($fp);
+
$attachments[$localfilename] = $filename;
}
echo "// --></SCRIPT>\n\n";
}
- echo "\n<FORM name=compose action=\"compose.php\" METHOD=POST ENCTYPE=\"multipart/form-data\">\n";
- //echo "\n<FORM name=compose action=\"compose.php\" METHOD=POST>\n";
+ echo "\n<FORM name=compose action=\"compose.php\" METHOD=POST ENCTYPE=\"multipart/form-data\"";
+ do_hook("compose_form");
+ echo ">\n";
if ($reply_id) {
echo "<input type=hidden name=reply_id value=$reply_id>\n";
}
} else if (isset($attach)) {
if (saveAttachedFiles())
plain_error_message(_("Could not move/copy file. File not attached"), $color);
+ displayPageHeader($color, $mailbox);
showInputForm();
} else if (isset($do_delete)) {
is_logged_in();
}
showInputForm();
+ } else if ($smtpErrors) {
+ $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
+ displayPageHeader($color, $mailbox);
+
+ $newmail = true;
+ if ($forward_id && $ent_num) getAttachments(0);
+
+ newMail();
+ showInputForm();
+ sqimap_logout($imapConnection);
} else {
$imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
displayPageHeader($color, $mailbox);
$newmail = true;
+
if ($forward_id && $ent_num) getAttachments(0);
newMail();