Well, I don't know about php, on
http://www.w3schools.com/PHP/php_ref_mail.asp says it just needs a working mail system, so if you need to know only how to write the ssmtp.conf file, then I can help you with that. ssmtp will allow you to send mail directly from your computer through an external smtp server.
A working ssmtp.conf file:
root=postmaster #you probably won't need to change it
mailhub=
where.the.mail.goes.com #eg. stmp.someserver.com
hostname=
what.goes.after.@.inyourmail #eg. domain.com
AuthUser=
your.login.name #for the stmp account
AuthPass=
your.password.for.it
AuthMethod=LOGIN # or CRAM-MD5
(ssmtp supports only these two authentication methods, check more at the manuals)