php mail() change header to remove unrequired information

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ykhamitkar
    New Member
    • May 2007
    • 64

    php mail() change header to remove unrequired information

    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.c om
    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
    Recognized Expert Expert
    • Apr 2007
    • 5821

    #2
    Heya, Yogesh.

    Are you using mail() or PHPMailer?

    Comment

    • ykhamitkar
      New Member
      • May 2007
      • 64

      #3
      Hi,

      Thanks for responding
      I am using mail()



      Originally posted by pbmods
      Heya, Yogesh.

      Are you using mail() or PHPMailer?

      Comment

      • pbmods
        Recognized Expert Expert
        • Apr 2007
        • 5821

        #4
        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).

        Comment

        • ykhamitkar
          New Member
          • May 2007
          • 64

          #5
          Here u go

          =============== ===========[code=php]
          $headers = '';
          // To send HTML mail, the Content-type header must be set
          //$headers = 'MIME-Version: 1.0' . "\r\n";
          $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

          // Additional headers
          $headers .= 'To: My Company name <email@id.com >' . "\r\n";
          $headers .= 'From: Name of the sender <emailid@id.com >' . "\r\n";

          mail($to, $subject, $mailBody, $headers);[/code]
          =============== ===========
          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).

          Comment

          • pbmods
            Recognized Expert Expert
            • Apr 2007
            • 5821

            #6
            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.

            Comment

            Working...