$body = "";
for ($i=0; $i < count($body_ary); $i++) {
if ($i==0 && $forward_id) {
- $tmp = "-------- " . _("Original Message") . " --------";
+ $tmp = "-------- " . _("Original Message") . " --------\n";
$tmp .= _("Subject") . ": " . $orig_header->subject . "\n";
$tmp .= " " . _("From") . ": " . $orig_header->from . "\n";
$tmp .= " " . _("To") . ": " . $orig_header->to[0] . "\n";
/** This formats a CC string if they hit "reply all" **/
if ($send_to_cc != "") {
+ $send_to_cc = ereg_replace( '"[^"]*"', "", $send_to_cc);
$send_to_cc = ereg_replace(";", ",", $send_to_cc);
$sendcc = explode(",", $send_to_cc);
$send_to_cc = "";
echo "// --></SCRIPT>\n\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\">\n";
+ //echo "\n<FORM name=compose action=\"compose.php\" METHOD=POST>\n";
if ($reply_id) {
echo "<input type=hidden name=reply_id value=$reply_id>\n";
}
echo "</TABLE>\n";
echo "</FORM>";
+ do_hook("compose_bottom");
}
function showSentForm () {
error message, show=true **/
global $body, $send_to, $subject, $color;
- if ($body == "" && $subject == "") {
- if ($show)
- plain_error_message(_("You have not entered a message body or a subject."), $color);
- return false;
- } else if ($send_to == "") {
+ if ($send_to == "") {
if ($show)
plain_error_message(_("You have not filled in the \"To:\" field."), $color);
return false;
error_reporting(0); // Rename will produce error output if it fails
if (!rename($attachfile, $attachment_dir.$localfilename)) {
if (!copy($attachfile, $attachment_dir.$localfilename)) {
- plain_error_message(_("Could not move/copy file. File not attached"));
+ plain_error_message(_("Could not move/copy file. File not attached"), $color);
$failed = true;
}
}
is_logged_in();
displayPageHeader($color, $mailbox);
- while (list($key, $localname) = each($delete)) {
- array_splice ($attachments, $key, 1);
+ while (list($lkey, $localname) = each($delete)) {
+ array_splice ($attachments, $lkey, 1);
unlink ($attachment_dir.$localname);
unlink ($attachment_dir.$localname.".info");
}