git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1415
7612ce4b-ef26-0410-bec9-
ea0150e637f0
if (isMultipart()) {
foreach ($attachments as $info)
{
if (isMultipart()) {
foreach ($attachments as $info)
{
-// echo "<pre>Attachment Info:\n";
-// var_dump($info);
-// echo "\n</pre>\n";
if (isset($info['type']))
$filetype = $info['type'];
else
if (isset($info['type']))
$filetype = $info['type'];
else
$header .= "Content-Disposition: attachment; filename=\"" .
$info['remotefilename'] . "\"\r\n";
$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";
if (substr($filetype, 0, 5) == 'text/' ||
$filetype == 'message/rfc822') {
$header .= "\r\n";