WordPress.org

Make WordPress Core

Ticket #18521: wp_18521.patch

File wp_18521.patch, 2.0 KB (added by jetpackpony, 7 years ago)

The patch based on suggested fix

  • D:/web/wp_official/wp-includes/class-phpmailer.php

     
    654654      ini_set('sendmail_from', $this->Sender);
    655655      if ($this->SingleTo === true && count($toArr) > 1) {
    656656        foreach ($toArr as $key => $val) {
    657           $rt = @mail($val, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params);
     657          $rt = @mail($val, $this->Subject, $body, $header, $params);
    658658          // implement call back function if it exists
    659659          $isSent = ($rt == 1) ? 1 : 0;
    660660          $this->doCallback($isSent,$val,$this->cc,$this->bcc,$this->Subject,$body);
    661661        }
    662662      } else {
    663         $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params);
     663        $rt = @mail($to, $this->Subject, $body, $header, $params);
    664664        // implement call back function if it exists
    665665        $isSent = ($rt == 1) ? 1 : 0;
    666666        $this->doCallback($isSent,$to,$this->cc,$this->bcc,$this->Subject,$body);
     
    668668    } else {
    669669      if ($this->SingleTo === true && count($toArr) > 1) {
    670670        foreach ($toArr as $key => $val) {
    671           $rt = @mail($val, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params);
     671          $rt = @mail($val, $this->Subject, $body, $header, $params);
    672672          // implement call back function if it exists
    673673          $isSent = ($rt == 1) ? 1 : 0;
    674674          $this->doCallback($isSent,$val,$this->cc,$this->bcc,$this->Subject,$body);
    675675        }
    676676      } else {
    677         $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header);
     677        $rt = @mail($to, $this->Subject, $body, $header);
    678678        // implement call back function if it exists
    679679        $isSent = ($rt == 1) ? 1 : 0;
    680680        $this->doCallback($isSent,$to,$this->cc,$this->bcc,$this->Subject,$body);