Please see:

How to send mail using SMTP in PHP | Official Web Hosting Blog by eUKhost Ltd.

Further information: