fixed the bug of not being able to have a period on a blank line when
authorlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 14 Dec 2000 02:54:00 +0000 (02:54 +0000)
committerlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 14 Dec 2000 02:54:00 +0000 (02:54 +0000)
sending a message (RFC281, section 4.5.2)

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@886 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/smtp.php

index 9f595ca09dc354979055ebc3eb07ef12dfc64dd4..8c945bbd89b0fd81e7af5894d09bcca1fa087343 100644 (file)
          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);