Connecting Tech Pros Worldwide Forums | Help | Site Map

php mail() change header to remove unrequired information

Member
 
Join Date: May 2007
Posts: 64
#1: Aug 22 '07
Hi there,

I have used php mail script to send mail() to send email. The script works well

However in the email I also get some following information in the header

============================
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - server.server.com
X-AntiAbuse: Original Domain - yahoo.com
X-AntiAbuse: Originator/Caller UID/GID - [37049 5555] / [47 12]
X-AntiAbuse: Sender Address Domain - abc.com
============================

How can I remove or change all X values

Thanks

pbmods's Avatar
Site Moderator
 
Join Date: Apr 2007
Location: Texas
Posts: 5,435
#2: Aug 22 '07

re: php mail() change header to remove unrequired information


Heya, Yogesh.

Are you using mail() or PHPMailer?
Member
 
Join Date: May 2007
Posts: 64
#3: Aug 22 '07

re: php mail() change header to remove unrequired information


Hi,

Thanks for responding
I am using mail()



Quote:

Originally Posted by pbmods

Heya, Yogesh.

Are you using mail() or PHPMailer?

pbmods's Avatar
Site Moderator
 
Join Date: Apr 2007
Location: Texas
Posts: 5,435
#4: Aug 22 '07

re: php mail() change header to remove unrequired information


Heya, Yogesh.

In that case, somewhere in your script, these headers are getting set.

Post the code that sends the email (we don't need to see the entire script; just the part that sends the email).
Member
 
Join Date: May 2007
Posts: 64
#5: Aug 22 '07

re: php mail() change header to remove unrequired information


Here u go

==========================
Expand|Select|Wrap|Line Numbers
  1. $headers = '';
  2. // To send HTML mail, the Content-type header must be set
  3. //$headers  = 'MIME-Version: 1.0' . "\r\n";
  4. $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
  5.  
  6. // Additional headers
  7. $headers .= 'To: My Company name <email@id.com>' . "\r\n";
  8. $headers .= 'From: Name of the sender <emailid@id.com>' . "\r\n";
  9.  
  10. mail($to, $subject, $mailBody, $headers);
==========================
Quote:

Originally Posted by pbmods

Heya, Yogesh.

In that case, somewhere in your script, these headers are getting set.

Post the code that sends the email (we don't need to see the entire script; just the part that sends the email).

pbmods's Avatar
Site Moderator
 
Join Date: Apr 2007
Location: Texas
Posts: 5,435
#6: Aug 22 '07

re: php mail() change header to remove unrequired information


Heya, Yogesh.

Check with your hosting provider. They may be inserting these headers while sending the email, and there may be nothing you can do about that except switch providers.
Reply