Changing or removing the mailed-by header when sending email via PHPMailer

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

    Changing or removing the mailed-by header when sending email via PHPMailer

    Hi there

    I am using php-mailer to send email.
    The mail goes succesfully however in each email I get "mailed-by: survername.com"

    How can I remove mailed-by tag from email

    Thanks,
    Yogesh
  • pbmods
    Recognized Expert Expert
    • Apr 2007
    • 5821

    #2
    Changed thread title to better describe the problem (did you know that threads whose titles that do not follow the Posting Guidelines actually get FEWER responses?).

    Comment

    • Atli
      Recognized Expert Expert
      • Nov 2006
      • 5062

      #3
      Hi.

      There is detailed documentation on PHPMailer at it's publisher's web, located here.

      I could not find anything relating to your problem, but you may want to look for yourself.

      Comment

      • ykhamitkar
        New Member
        • May 2007
        • 64

        #4
        php mail mailed-by server.name.com

        Hi

        I am putting this query again as somebody suggested me to change the header of my previous thread.


        my php mail function works fine. However it gives an extra information in email as :

        mailed-by server.name.com


        *sever.name.com is only indicative

        How can I remove this

        Thanks
        Yogesh

        Comment

        • pbmods
          Recognized Expert Expert
          • Apr 2007
          • 5821

          #5
          Merged duplicate threads. I went ahead and added additional detail to your thread title to remove any ambiguity.

          Comment

          • pbmods
            Recognized Expert Expert
            • Apr 2007
            • 5821

            #6
            Heya, Yogesh.

            Did you find the information you were looking for at the link that Atli provided?

            Comment

            • ykhamitkar
              New Member
              • May 2007
              • 64

              #7
              No I havent got any solution on that. :(

              Originally posted by pbmods
              Heya, Yogesh.

              Did you find the information you were looking for at the link that Atli provided?

              Comment

              • pbmods
                Recognized Expert Expert
                • Apr 2007
                • 5821

                #8
                Heya, Yogesh.

                Can you remove it by using AddCustomHeader ()?

                Comment

                • smithveg
                  New Member
                  • Nov 2008
                  • 2

                  #9
                  I found the solution,

                  # Create an email address from your domain, or take one you've had, like admin@yourdomai n.com.
                  # Set your code like this:
                  mail($mailto,$s ubject,$message ,$header,'-f admin@yourdomai n.com');
                  # There's no number 3, you're done!

                  Source: http://imamkhalid.blogspot.com/2008/...mailed-by.html
                  Last edited by smithveg; Nov 11 '08, 11:04 AM. Reason: found the solution

                  Comment

                  • spheroid
                    New Member
                    • Nov 2009
                    • 1

                    #10
                    @smithveg: Your solution is using the PHP function mail but ykhamitkar wants to do this via the PHP-Mailer script. I'm looking for an answer on this one too. Anyone?

                    Comment

                    • lansnide
                      New Member
                      • Feb 2010
                      • 1

                      #11
                      PHPMailer has a Sender property that can be set. Their documentation of it says "Sets the Sender email (Return-Path) of the message. If not empty, will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode".

                      I set it to my email addres and the 'mailed-by' header disappeared altogether in the email I received. Not was I was hoping for, but better than what it was. I don't know if I am in smtp mode or not, but maybe someone else can take this further and illuminate all of us on the subject...

                      Comment

                      Working...