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

WordPress Trac noreply at wordpress.org
Tue Aug 23 11:10:06 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 mt8.biz):

 Replying to [comment:26 Grzegorz.Janoszka]:
 > Replying to [comment:25 mt8.biz]:
 > > > As mentioned earlier - it completely doesn't work when system cron
 is used. Please fix it.
 > > How to reproduce?
 >
 > Wordpress + nginx + system cron sending emails.
 >
 > Not sure if nginx is required, when you use system cron the variables
 coming from http daemon will not be set. How do you expect to get anything
 from `$_SERVER['SERVER_NAME']` or `$_SERVER['HTTP_HOST']` when you just
 call the php script from cron (php wp-cron.php)?


 Should use the DB settings instead of using the $ _SEREVER I think

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


More information about the wp-trac mailing list