Jorge

Well-Known Member
Feb 19, 2003
49
1
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 [email protected] as the sender.

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

webignition

Well-Known Member
Jan 22, 2005
1,880
0
166
The actual sender of the email will always, if you have phpsuexec enabled, be [email protected] because the actual sender is the user at the given host. Otherwise it will be [email protected] 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.