--

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
earthpiper
Forum Newbie
Posts: 3
Joined: Tue Aug 12, 2008 10:38 pm

--

Post by earthpiper »

--
Last edited by earthpiper on Sat Feb 12, 2011 5:10 am, edited 1 time in total.
User avatar
lukewilkins
Forum Commoner
Posts: 55
Joined: Tue Aug 12, 2008 2:42 pm

Re: Overwrite/Add to a default PHP function

Post by lukewilkins »

Before you try to rewrite the way that all mail() functions work on your server, what is it about mail() that you are trying to change? There may already be answers out there.

Thanks,
Luke
earthpiper
Forum Newbie
Posts: 3
Joined: Tue Aug 12, 2008 10:38 pm

Re: Overwrite/Add to a default PHP function

Post by earthpiper »

I need to force full headers for the sending address IE our postfix relay sends as our apache user so the envelope sending address is webserver not the actual sender. so the mail function would look like this mail('to@domain.com' , 'foo' , 'blah', 'FROM: sender@domain.com' , '-fsender@domain.com');
User avatar
idevlin
Forum Commoner
Posts: 78
Joined: Tue Jun 26, 2007 1:10 pm
Location: Cambridge, UK

Re: Overwrite/Add to a default PHP function

Post by idevlin »

Code: Select all

bool mail  ( string $to  , string $subject  , string $message  [, string $additional_headers  [, string $additional_parameters  ]] )
So you can add the additional headers if you want to. See http://uk2.php.net/manual/en/function.mail.php for more details.
Post Reply