From: lkehresman Date: Sat, 25 Mar 2000 14:04:06 +0000 (+0000) Subject: bugfixed the saving sent X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;ds=inline;h=f8308f16d4ef77fb547b5fae851fcefbdbe5586b;p=squirrelmail.git bugfixed the saving sent git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@344 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/imap_general.php b/functions/imap_general.php index 9bfc1a46..91f203a9 100755 --- a/functions/imap_general.php +++ b/functions/imap_general.php @@ -236,11 +236,14 @@ ** Saves a message to a given folder -- used for saving sent messages ******************************************************************************/ function sqimap_append ($imap_stream, $sent_folder, $length) { - fputs ($imap_stream, "a001 APPEND $sent_folder (\\Seen) \{$length}\n"); + fputs ($imap_stream, "a001 APPEND \"$sent_folder\" (\\Seen) \{$length}\r\n"); $tmp = fgets ($imap_stream, 1024); + echo $tmp; } function sqimap_append_done ($imap_stream) { fputs ($imap_stream, "\r\n"); + $tmp = fgets ($imap_stream, 1024); + echo $tmp; } ?> diff --git a/functions/smtp.php b/functions/smtp.php index 73561ee1..04e92bf0 100644 --- a/functions/smtp.php +++ b/functions/smtp.php @@ -38,7 +38,7 @@ $filetype = "application/octet-stream"; $header = "--".mimeBoundary()."\r\n"; - $header .= "Content-Type: $filetype\n"; + $header .= "Content-Type: $filetype\r\n"; $header .= "Content-Disposition: attachment; filename=\"$remotename\"\r\n"; $header .= "Content-Transfer-Encoding: base64\r\n\r\n"; fputs ($fp, $header); @@ -144,7 +144,7 @@ /* Make an RFC822 Received: line */ $header = "Received: from $REMOTE_ADDR by $SERVER_NAME with HTTP; "; - $header .= "$date\n"; + $header .= "$date\r\n"; /* Insert the rest of the header fields */ $header .= "Message-ID: $message_id\r\n"; @@ -170,7 +170,7 @@ $header .= "X-Mailer: SquirrelMail (version $version)\r\n"; // Identify SquirrelMail // Do the MIME-stuff - $header .= "MIME-Version: 1.0\n"; + $header .= "MIME-Version: 1.0\r\n"; if (isMultipart()) { $header .= "Content-Type: multipart/mixed; boundary=\""; @@ -439,6 +439,7 @@ writeBody ($imap_stream, $body); sqimap_append_done ($imap_stream); + // Delete the files uploaded for attaching (if any). deleteAttachments();