Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Sean Coates' Blog:
mail() Replacement -- a Better Hack
Aug 02, 2005 @ 10:54:38

In response to Davey's post yesterday about the mail() hack (for servers without sendmail), Sean Coates has his version of "a better hack" along the same lines.

This morning, I read Davey's post about how to compile PHP in a way that allows you ro specify your own mail() function. This is kind of a cool hack, but I've been using a different approach for a while, now, that allows much better control. Read on if you're interested.

In Sean's version, there's no need to redefine the PHP mail() function - or even to edit the source or recompile. His "magic" lies in the sendmail_path directive in the php.ini file. He gives you some example setups for it, including just logging it to a file and, as the replacement functionality, using a call to formail to accomplish the same thing...

tagged:

Link:


Trending Topics: