In a recent post to his blog Idrish Laxmidhar walks you through the process of getting Mercury set up for local mailing and used by an XAMPP installation for debugging.
Had tried to make php mail() work on localhost. But had failed. So gave up. This was around 8 months back. Now again some days back had to use the Php mail function on one project. [...] A lot of google searching and some simple steps, I could make it work. So here sharing my experience with you.
He starts with a list of requirements to follow along with his process - a web server, a mail server (in this case Mercury) and a mail client - and then starts into the steps. Each one is accompanied by screenshots showing you exactly what each of the screens should look like as you follow along. In the end you'll have a local mail server you can connect to and test with without ever having to send out a public email.