Browse Source

* Found my bug

Tyler Akins 24 years ago
parent
commit
9798d0a2aa
1 changed files with 2 additions and 1 deletions
  1. 2 1
      functions/smtp.php

+ 2 - 1
functions/smtp.php

@@ -100,7 +100,8 @@
 	          $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);
 	       }