by John Andrewartha.
If you are using Debian or Ubunto as the server, it may be caused by the smtp. If I remember by default php looks for Sendmail which is not installed by default.
From a cli type sendmail -v if installed it should respond. If not aptitude install sendmail to install.
I assume you have superuser privilages "root"