How can I configure PHP to send all outgoing mail to my own account so that I can test a business application without actually sending mails to unsuspecting businesses, such as "Congratulations, you have a new account. You will be billed for $xxx" ?
['https://Stackoverflow.com/questions/3346305', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/270511/']
Rather than configuring PHP, a generalized solution would be to stand up a dummy SMTP server.

See [this question](https://stackoverflow.com/questions/1006650).
So you already wrote the application and it uses live email addresses, and now you want to test it? Did you use a centralized function for mail or are there tons of mail() calls all over the code? Sorry but you're going to have to change every mail() call. Do yourself a favor and replace them all with your own function, and then handle test/live functionality in that one location.