It's so frustrating when you can't use your localhost to send or test emails. Well it's no more frustrating, thanks to good guys from toolhip. They have created a mail server tool and is available for free. We can now use it to test our contact us form or any other pages that are configured to send emails, locally before moving them to staging or development server.
Lets download SMTP tool (http://www.toolheap.com/test-mail-server-tool/TestMailServerToolSetup.exe) from http://www.toolheap.com/test-mail-server-tool/. Follow the instruction when installing, which is quite straight forward.
Then, on php.ini file check and modify where necessary (as below):
[mail function] ; For Win32 only. ; http://php.net/smtp SMTP = localhost ; http://php.net/smtp-port smtp_port = 25 ; For Win32 only. ; http://php.net/sendmail-from sendmail_from = [email protected]