Hello friends, today i am going to tell you how to send email by codeigniter via hostgator if you are using hostgator then following instructions would be beneficial for you. first of all create an email account relevant to domain in hostgator then go to manage email accounts then there would be a link config client email with each each email in listing then click on that link then it will give you credential how to setup email for web services.

I was using codeigniter so following code may help you:

Use SSL Email Configuration Recommended optionĀ otherwise it will not work in localhost.