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
This commit is contained in:
parent
bb667710a6
commit
08efb40e98
@ -760,13 +760,13 @@ class PHPMailer {
|
|||||||
} else {
|
} else {
|
||||||
if ($this->SingleTo === true && count($toArr) > 1) {
|
if ($this->SingleTo === true && count($toArr) > 1) {
|
||||||
foreach ($toArr as $key => $val) {
|
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
|
// implement call back function if it exists
|
||||||
$isSent = ($rt == 1) ? 1 : 0;
|
$isSent = ($rt == 1) ? 1 : 0;
|
||||||
$this->doCallback($isSent, $val, $this->cc, $this->bcc, $this->Subject, $body);
|
$this->doCallback($isSent, $val, $this->cc, $this->bcc, $this->Subject, $body);
|
||||||
}
|
}
|
||||||
} else {
|
} 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
|
// implement call back function if it exists
|
||||||
$isSent = ($rt == 1) ? 1 : 0;
|
$isSent = ($rt == 1) ? 1 : 0;
|
||||||
$this->doCallback($isSent, $to, $this->cc, $this->bcc, $this->Subject, $body);
|
$this->doCallback($isSent, $to, $this->cc, $this->bcc, $this->Subject, $body);
|
||||||
|
Loading…
Reference in New Issue
Block a user