When you use mail function in your php codes, for testing and debugging your codes at localhost, you should have a Mail Server installed on your computer. otherwise, you will get a warning message, and your code may not work properly.
I have written an application with Delphi, that acts as an SMTP Server. Therefor when testing your codes at localhost you will not receive any warning messages.
but keep in mind that this application is not a real SMTP Server and do nothing with the mails sent by mail function. it only acts like an SMTP Server and just displays sent messages.
This application also uses indy9 for SMTPServer, TTntComponents for Unicode Support and TCoolTrayIcon for trayicon and balloon hints.