浏览代码

Finally fixes de escaping '.' with sendmail. Sendmail supports the option -i
and with that option set we don't have to escape.

Thnx to Cor Bosman the issue is solved.

stekkel 23 年之前
父节点
当前提交
76c2a4a9d5
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      class/deliver/Deliver_SendMail.class.php

+ 3 - 3
class/deliver/Deliver_SendMail.class.php

@@ -16,7 +16,7 @@ class Deliver_SendMail extends Deliver {
 
 
     function preWriteToStream(&$s) {
     function preWriteToStream(&$s) {
        if ($s) {
        if ($s) {
-    	  $s = str_replace(".\n",".\r\n",str_replace("\r\n", "\n", $s));
+    	  $s = str_replace("\r\n", "\n", $s);
        }
        }
     }
     }
     
     
@@ -25,9 +25,9 @@ class Deliver_SendMail extends Deliver {
 	$from = $rfc822_header->from[0];
 	$from = $rfc822_header->from[0];
 	$envelopefrom = $from->mailbox.'@'.$from->host;
 	$envelopefrom = $from->mailbox.'@'.$from->host;
 	if (strstr($sendmail_path, "qmail-inject")) {
 	if (strstr($sendmail_path, "qmail-inject")) {
-    	    $stream = popen (escapeshellcmd("$sendmail_path -f$envelopefrom"), "w");
+    	    $stream = popen (escapeshellcmd("$sendmail_path -i -f$envelopefrom"), "w");
 	} else {
 	} else {
-    	    $stream = popen (escapeshellcmd("$sendmail_path -t -f$envelopefrom"), "w");
+    	    $stream = popen (escapeshellcmd("$sendmail_path -i -t -f$envelopefrom"), "w");
 	}
 	}
 	return $stream;
 	return $stream;
     }
     }