fixed bug with one line length text message with an attachment not displaying.
[squirrelmail.git] / functions / smtp.php
index 9546fe76bd7619242abe73b12699524d0f804fe0..9f595ca09dc354979055ebc3eb07ef12dfc64dd4 100644 (file)
@@ -50,7 +50,7 @@
                $filetype = "application/octet-stream";
             
             $header = "--".mimeBoundary()."\r\n";
-            $header .= "Content-Type: $filetype\r\n";
+            $header .= "Content-Type: $filetype;name=\"$remotename\"\r\n";
             $header .= "Content-Disposition: attachment; filename=\"$remotename\"\r\n";
             $header .= "Content-Transfer-Encoding: base64\r\n\r\n";
             fputs ($fp, $header);
             $body .= "Content-Type: text/plain\r\n";
 
          $body .= "Content-Transfer-Encoding: 8bit\r\n\r\n";
-         $body .= sqStripSlashes($passedBody) . "\r\n";
+         $body .= sqStripSlashes($passedBody) . "\r\n\r\n";
          fputs ($fp, $body);
 
          $attachmentlength = attachFiles($fp);