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

WordPress Trac noreply at wordpress.org
Tue Oct 18 19:34:27 UTC 2016


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

Comment (by desmith):

 Let's reduce the scope a bit, then. Latest version just has a function
 called {{{get_email_domain()}}} that returns the domain name, leading www.
 stripped, and that's it. Function name is a bit more clear, at least. All
 the places it's being used are related to email, so the function name and
 its use make a bit more sense.

 If we want to add an if{} to only act if {{{$_SERVER['SERVER_NAME']}}} is
 unset, easy enough to do, but I'm not sure it's necessary.
 Thoughts/opinions?

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


More information about the wp-trac mailing list