minor fix for the quote problem
authorlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 7 Jan 2000 21:28:16 +0000 (21:28 +0000)
committerlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 7 Jan 2000 21:28:16 +0000 (21:28 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@134 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/smtp.php

index 3595f84d87e81a6ac492096e0c6f851e21f68434..f75ea3e808009f4924dbab4a817a27437376712c 100644 (file)
@@ -76,6 +76,7 @@
       $tmp = nl2br(htmlspecialchars(fgets($smtpConnection, 1024)));
       errorCheck($tmp);
 
       $tmp = nl2br(htmlspecialchars(fgets($smtpConnection, 1024)));
       errorCheck($tmp);
 
+      $subject = stripslashes($subject);
       fputs($smtpConnection, "Subject: $subject\n"); // Subject
       fputs($smtpConnection, "From: $from\n"); // Subject
       fputs($smtpConnection, "To: $to_list\n");    // Who it's TO
       fputs($smtpConnection, "Subject: $subject\n"); // Subject
       fputs($smtpConnection, "From: $from\n"); // Subject
       fputs($smtpConnection, "To: $to_list\n");    // Who it's TO
@@ -89,8 +90,7 @@
       if ($reply_to != "")
          fputs($smtpConnection, "Reply-To: $reply_to\n");
 
       if ($reply_to != "")
          fputs($smtpConnection, "Reply-To: $reply_to\n");
 
-      str_replace("\\\"", "\"", $body);
-      str_replace("\\\'", "\'", $body);
+      $body = stripslashes($body);
       fputs($smtpConnection, "$body\n"); // send the body of the message
 
       fputs($smtpConnection, ".\n"); // end the DATA part
       fputs($smtpConnection, "$body\n"); // send the body of the message
 
       fputs($smtpConnection, ".\n"); // end the DATA part