From 08efb40e9858e2c752dd0147285dfce6a62c9c7f Mon Sep 17 00:00:00 2001 From: nacin Date: Tue, 26 Jun 2012 03:54:17 +0000 Subject: [PATCH] Do not pass mail() a fourth argument when safe_mode is in effect. Fixes the sending of mail when in safe_mode. There is a bug report being addressed upstream with PHPMailer. props sumindmitriy. see #20970 for trunk. git-svn-id: http://core.svn.wordpress.org/trunk@21128 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-phpmailer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/class-phpmailer.php b/wp-includes/class-phpmailer.php index ba4ddb2eb3..df533c2715 100644 --- a/wp-includes/class-phpmailer.php +++ b/wp-includes/class-phpmailer.php @@ -760,13 +760,13 @@ class PHPMailer { } else { if ($this->SingleTo === true && count($toArr) > 1) { foreach ($toArr as $key => $val) { - $rt = @mail($val, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params); + $rt = @mail($val, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header); // implement call back function if it exists $isSent = ($rt == 1) ? 1 : 0; $this->doCallback($isSent, $val, $this->cc, $this->bcc, $this->Subject, $body); } } else { - $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params); + $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header); // implement call back function if it exists $isSent = ($rt == 1) ? 1 : 0; $this->doCallback($isSent, $to, $this->cc, $this->bcc, $this->Subject, $body);