Ticket #21074: 21074.01.diff
File 21074.01.diff, 2.8 KB (added by , 12 years ago) |
---|
-
wp-includes/class-phpmailer.php
723 723 } 724 724 725 725 /** 726 * Calls actual mail() function, but in a safe_mode aware fashion 727 * @param string $to To 728 * @param string $subject Subject 729 * @param string $body Message Body 730 * @param string $headers Additional Headers 731 * @param string $params Params 732 * @access private 733 * @return bool 734 */ 735 private function mail_passthru($to, $subject, $body, $header, $params) { 736 if (ini_get('safe_mode')) { 737 $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($subject)), $body, $header); 738 } else { 739 $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($subject)), $body, $header, $params); 740 } 741 return $rt; 742 } 743 /** 726 744 * Sends mail using the PHP mail() function. 727 745 * @param string $header The message headers 728 746 * @param string $body The message body … … 746 764 ini_set('sendmail_from', $this->Sender); 747 765 if ($this->SingleTo === true && count($toArr) > 1) { 748 766 foreach ($toArr as $key => $val) { 749 $rt = @mail($val, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params);767 $rt = mail_passthru($val, $this->Subject, $body, $header, $params); 750 768 // implement call back function if it exists 751 769 $isSent = ($rt == 1) ? 1 : 0; 752 770 $this->doCallback($isSent, $val, $this->cc, $this->bcc, $this->Subject, $body); 753 771 } 754 772 } else { 755 $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params);773 $rt = mail_passthru($to, $this->Subject, $body, $header, $params); 756 774 // implement call back function if it exists 757 775 $isSent = ($rt == 1) ? 1 : 0; 758 776 $this->doCallback($isSent, $to, $this->cc, $this->bcc, $this->Subject, $body); … … 760 778 } else { 761 779 if ($this->SingleTo === true && count($toArr) > 1) { 762 780 foreach ($toArr as $key => $val) { 763 $rt = @mail($val, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header);781 $rt = mail_passthru($val, $this->Subject, $body, $header, $params); 764 782 // implement call back function if it exists 765 783 $isSent = ($rt == 1) ? 1 : 0; 766 784 $this->doCallback($isSent, $val, $this->cc, $this->bcc, $this->Subject, $body); 767 785 } 768 786 } else { 769 $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header);787 $rt = mail_passthru($to, $this->Subject, $body, $header, $params); 770 788 // implement call back function if it exists 771 789 $isSent = ($rt == 1) ? 1 : 0; 772 790 $this->doCallback($isSent, $to, $this->cc, $this->bcc, $this->Subject, $body);