[wp-trac] [WordPress Trac] #25239: $_SERVER['SERVER_NAME'] not a reliable when generating email host names

WordPress Trac noreply at wordpress.org
Fri Jul 24 17:38:42 UTC 2020


#25239: $_SERVER['SERVER_NAME'] not a reliable when generating email host names
--------------------------------------------------+------------------------
 Reporter:  layotte                               |       Owner:  whyisjake
     Type:  defect (bug)                          |      Status:  closed
 Priority:  normal                                |   Milestone:  5.5
Component:  Mail                                  |     Version:  3.8
 Severity:  normal                                |  Resolution:  fixed
 Keywords:  has-patch dev-feedback needs-testing  |     Focuses:
--------------------------------------------------+------------------------
Changes (by whyisjake):

 * owner:  (none) => whyisjake
 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"48601" 48601]:
 {{{
 #!CommitTicketReference repository="" revision="48601"
 Mail: Ensure that a server hostname can be set by using
 `network_home_url()`.

 Due to the varying server setups, `$_SERVER['SERVER_NAME'];` can't
 reliably ensure that there will be a relevant host that could be used as
 the hostname in an email. Since the `network_home_url()` is set at this
 point, and is filterable, this should better enable emails to be sent from
 the server.

 Fixes #25239.
 Props layotte, SergeyBiryukov, nacin, sreedoap, szepe.viktor, jesin,
 kitchin, mensmaximus, mt8.biz, Grzegorz.Janoszka, cbutlerjr, dd32, BjornW,
 neodjandre, BjornW, Ipstenu, ocean90, danielbachhuber, desmith, joemcgill,
 jdgrimes, riasat, derekakelly, swissspidy, lilmike, tsimmons,
 robert.peake, DavidAnderson, cloudstek, pigdog234, BjornW, rawrly,
 pessoft, RedSand, seayou, dvershinin, bastho, chesio, Starbuck, afragen,
 ocean90, whyisjake.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/25239#comment:114>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list