WordPress.org

Make WordPress Core

Ticket #14888: wp-phpmailer.diff

File wp-phpmailer.diff, 851 bytes (added by LynxChaus, 8 years ago)
  • (a) a/wp-includes/class-phpmailer.php.orig vs. (b) b/wp-includes/class-phpmailer.php

    a b  
    518518      return false;
    519519    }
    520520
    521     $smtp_from = ($this->Sender == '') ? $this->From : $this->Sender;
    522     if(!$this->smtp->Mail($smtp_from)) {
     521    if(!$this->smtp->Mail($this->Sender)) {
    523522      $error = $this->Lang('from_failed') . $smtp_from;
    524523      $this->SetError($error);
    525524      $this->smtp->Reset();
     
    865864
    866865    $result .= $this->HeaderLine('Date', $this->RFCDate());
    867866    if($this->Sender == '') {
    868       $result .= $this->HeaderLine('Return-Path', trim($this->From));
    869     } else {
    870       $result .= $this->HeaderLine('Return-Path', trim($this->Sender));
     867      $this->Sender = trim($this->From);
    871868    }
    872869
    873870    /* To be created automatically by mail() */