[wp-trac] [WordPress Trac] #37736: Emails fail on certain server setups

WordPress Trac noreply at wordpress.org
Fri Aug 19 13:06:06 UTC 2016


#37736: Emails fail on certain server setups
--------------------------+-----------------------------
 Reporter:  Clorith       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Mail          |    Version:  4.6
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 In 4.6 (see r38058) we changed how we apply the from email and name, we
 now use PHPMailers own `setFrom()` function call.

 This function can also autoamtically populates the `$Sender` variable
 (which it does by default).

 Further down, when `mailSend()` is called, the behavior
 [https://core.trac.wordpress.org/browser/tags/4.6/src/wp-includes/class-
 phpmailer.php#L1352 differs slightly] if `$Sender` is already set, we set
 a parameter of `-f`.

 It would appear some hosts do not allow the use of this flag, leading to
 emails no longer going out.

 Attaching a simple patch that tells PHPMailer not to populate this
 variable, as we previously set the from name and email directly and never
 saw the `$Sender` variable, this allows us to keep using PHPMailers
 internal functions, while avoiding the `$Sender` flag like we did pre-4.6

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37736>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list