Remove X-PHP-Script from Order Update Email

Open to all! Ask other shopowners for help.
Post Reply
User avatar
Cary
Member
Posts: 34
Joined: Fri Mar 12, 2021 9:36 pm
Phoenix Version: v1.0.9.1
Has thanked: 3 times
Been thanked: 3 times

Remove X-PHP-Script from Order Update Email

Post 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?
- Cary


Join The Code Co-op to get access to your library in the Code Co-op Forum
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

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

Post 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.


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply