I'm using codeigniter email function for sending mail. Here is the code.
$this->email->to($to);
$this->email->subject($subject);
$this->email->attach($_FILES['attachments']['tmp_name']);
$this->email->message($mailcontent);
if($this->email->send())
{
return true;
}
when I printed the content just before sending it like this, I found its fine till there.
$this->email->message($mailcontent);
print_r($mailcontent);exit;
if($this->email->send())
{
return true;
}
But the mail I'm getting is empty.It has subject but the body is empty. Why is this happening ?