Page 1 of 1

Remove X-PHP-Script from Order Update Email

Posted: Thu Jul 11, 2024 5:30 pm
by Cary
Way back in osC, I was able to remove the X-PHP-Script reference to the ADMIN folder in Order Update emails but I can't identify where this can be removed/changed in Phoenix 1.0.9, preferably without edited core.

Code: Select all

Subject: Order Update
X-PHP-Script: www.domainname.com/ADMINFOLDER/orders.php for XXX.XXX.XXX.XX
 X-PHP-Originating-Script: 1001:email.php
I've searched the forums but I can't seem to find a reference to a "fix" for this.
Thoughts?

Re: Remove X-PHP-Script from Order Update Email

Posted: Fri Jul 12, 2024 12:45 am
by ecartz
https://stackoverflow.com/questions/107 ... g-php-mail
https://stackoverflow.com/questions/674 ... -in-header

Code: Select all

class hook_admin_orders_hidden {

  private $php_self;

  public function listen_preAction() {
    if (isset($_GET['action']) && ('update_order' === $_GET['action'])) {
      ini_set('mail.add_x_header', 0);
    }

    $this->php_self = $_SERVER['PHP_SELF'];
    $_SERVER['PHP_SELF'] = HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'account_history.php';
  }

  public function listen_updateOrderAction() {
    $_SERVER['PHP_SELF'] = $this->php_self;
  }

}
Your host might allow one of those.

Or just change to a host that doesn't set that. That's not something that Phoenix does. That's something that a PHP host does.