<?php

 class Email_controller extends CI_Controller
 {

     function __construct()
     {
         parent::__construct();
         $this->load->library('session');
     }

     public function send_mail()
     {
         $from_email = "your@example.com";
         $to_email   = 'jbravo@cyberiatech.com.co';

         //Load email library 
         $this->load->library('email');

         $this->email->from($from_email, 'Your Name');
         $this->email->to($to_email);
         $this->email->subject('Email Test');
         $this->email->message('Testing the email class.');

         //Send mail 
         if (!$this->email->send()) var_dump($this->email->send());
     }

 }
 