* Found my bug
authorfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 21 May 2001 03:20:50 +0000 (03:20 +0000)
committerfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 21 May 2001 03:20:50 +0000 (03:20 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1383 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/smtp.php

index 64db214aae750a3c437db1e9252353c4abf37734..52d554bb63e8e007e96d09a80dce7dda909e36e8 100644 (file)
                  $tmp = str_replace("\r\n", "\n", $tmp);
                  $tmp = str_replace("\r", "\n", $tmp);
                  $tmp = str_replace("\n", "\r\n", $tmp);
-                 $tmp .= "\r\n";
+                 if (feof($fp) && substr($tmp, -2) != "\r\n")
+                    $tmp .= "\r\n";
                  fputs($fp, $tmp);
                  $length += strlen($tmp);
               }