Sending email in codeIgniter is much easier than you would imagine. At the end of this tutorial you would be able to send email through form.
Form
Before we start coding, we need to change some settings in our gmail account. We need to allow less secure apps to access our gmail account. To do that click here, make sure to turn it on.
Less