From f61de96662fb1e93329d4a78c9edeeafdf508975 Mon Sep 17 00:00:00 2001 From: fidian Date: Thu, 14 Jun 2001 12:19:56 +0000 Subject: [PATCH] * A fix for NT systems sending binary attachments git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1415 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/smtp.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/functions/smtp.php b/functions/smtp.php index 1454c405..d63cea5b 100644 --- a/functions/smtp.php +++ b/functions/smtp.php @@ -76,9 +76,6 @@ if (isMultipart()) { foreach ($attachments as $info) { -// echo "
Attachment Info:\n";
-//	    var_dump($info);
-//	    echo "\n
\n"; if (isset($info['type'])) $filetype = $info['type']; else @@ -90,7 +87,9 @@ $header .= "Content-Disposition: attachment; filename=\"" . $info['remotefilename'] . "\"\r\n"; - $file = fopen ($attachment_dir . $info['localfilename'], 'r'); + // Use 'rb' for NT systems -- read binary + // Unix doesn't care -- everything's binary! :-) + $file = fopen ($attachment_dir . $info['localfilename'], 'rb'); if (substr($filetype, 0, 5) == 'text/' || $filetype == 'message/rfc822') { $header .= "\r\n"; -- 2.25.1