How to send email from localhost using Gmail SMTP and other SMTP.
Read this post on mittalpatel.co.in