Forráskód Böngészése

fixed the bug of not being able to have a period on a blank line when
sending a message (RFC281, section 4.5.2)

Luke Ehresman 25 éve
szülő
commit
8c7d567187
1 módosított fájl, 6 hozzáadás és 0 törlés
  1. 6 0
      functions/smtp.php

+ 6 - 0
functions/smtp.php

@@ -504,6 +504,12 @@
          sqimap_mailbox_close($imap_stream);
       }
 
+      // In order to remove the problem of users not able to create
+	  // messages with "." on a blank line, RFC821 has made provision
+	  // in section 4.5.2 (Transparency).
+	  $body = ereg_replace("\n\.", "\n\.\.", $body);
+	  $body = ereg_replace("^\.", "\.\.", $body);
+
       // this is to catch all plain \n instances and
       // replace them with \r\n.  
       $body = ereg_replace("\r\n", "\n", $body);