PHP Classes

Change/Remove X-PHP-Script

Recommend this page to a friend!

      MIME E-mail message sending  >  All threads  >  Change/Remove X-PHP-Script  >  (Un) Subscribe thread alerts  
Subject:Change/Remove X-PHP-Script
Summary:How to change/remove X-PHP-Script from the headers
Messages:2
Author:vijay anand
Date:2011-11-11 02:32:20
Update:2011-11-11 05:44:52
 

  1. Change/Remove X-PHP-Script   Reply   Report abuse  
Picture of vijay anand vijay anand - 2011-11-11 02:32:20
Helo Mr.Manuel.,

I m back with a query..

when i send email using "email_message_class" everything works fine.,

but when i receive the email., i got this line in the headers which points out to the php page from which the script is called.,

Eg.,
[headers]
Date: Fri, 11 Nov 2011 10:17:02 +0800
To: Vijay anand <vj@myemail.com>
Subject: Your ticket is confirmed
X-PHP-Script: www.mywebsite.com/sendmail.php for XXX.XXX.XXX.XXX[ip address]
From: Ticket Master <booking@myemail.com>
Reply-To: Ticket Master <booking@myemail.com>
MIME-Version: 1.0
Content-Type: multipart/related;
[/headers]

How to remove this from header.,

i tried by inserting the below

[code]
$email_message->SetHeader("X-PHP-Script","http://www.mywebsite.com/nothing.php");
[/code]

which results in the following header..
[headers]

Date: Fri, 11 Nov 2011 10:17:02 +0800
To: Vijay anand <vj@myemail.com>
Subject: Your ticket is confirmed
X-PHP-Script: www.mywebsite.com/sendmail.php for XXX.XXX.XXX.XXX[ip address]
From: Ticket Master <booking@myemail.com>
Reply-To: Ticket Master <booking@myemail.com>
X-PHP-Script: http://www.mywebsite.com/nothing.php
MIME-Version: 1.0
Content-Type: multipart/related;
[/headers]


kindly advice me how to change this..

Thanks..
VJ.

  2. Re: Change/Remove X-PHP-Script   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2011-11-11 05:44:52 - In reply to message 1 from vijay anand
That header is added by the PHP mail() function as you are using email_message_class and PHP is configured to add that header.

If you do not want to show it, you may want to try using the smtp_message_class if you can relay the message to a SMTP server.