Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

mail() hostname question

Discussion in 'E-mail Discussion' started by Jorge, Jul 13, 2006.

  1. Jorge

    Jorge Well-Known Member

    Joined:
    Feb 19, 2003
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    156
    There's any way to hide the hostname on email sent through php mail()?
    I told to one of my customer to use a FROM header on the sending php script, however, still says username@host.hostname.net as the sender.

    I'm not sure if this can be configured on the php mail() options or anywhere.
    Is it possible?
     
  2. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    166
    The actual sender of the email will always, if you have phpsuexec enabled, be user@hostname because the actual sender is the user at the given host. Otherwise it will be nobody@hostname for the exact same reasons.

    You can set the From: header, and this is the value most commonly displayed in email clients. This is specified in the fourth parameter of the PHP mail() function.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Jorge

    Jorge Well-Known Member

    Joined:
    Feb 19, 2003
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    156
    Just found a solution :)

    Add

    trusted_users = USERNAME

    on exim.conf :)
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice