i am new in codeigniter what i am trying to do is fairly simple i am sending a mail using simple email library in code ignitor i have uploaded the code to the server but some how it is not sending the email! here's my code
constructor
function __construct(){
parent::__construct();
$this->load->helper(array('form', 'url'));
$this->load->model('contactus');
$this->load->library('email');
}
i have included the email library
public function contactus()
{
$data = $this->input->post();
$this->contactus->contactus_db($data);
$this->email->to('uneeb@nextcrawl.com');
$this->email->subject('Contact US');
$msg="hey uneeb";
$this->email->message($msg);
if($this->email->send()) {
echo "send";
}
else
{
echo "not send";
}
//redirect('Home');
}
this is my email code i have done some validations that either mail is actually send or not and in this case it is showing send i don't know what is the issue!