Hello i need help i have been doing my best to be able to send html email but its not working i just get the alert that email have not been sent. In the library > email.php file i havent change anything just left as default please help because i have been trying to solve this problem since two weeks ago please help!
$name = $this->input->post('name');
$email = $this->input->post('email');
$comment = $this->input->post('message');
$config['mailtype'] = 'html';
$this->load->library('email',$config);
$message = "<html>";
$message .= "<style type='text/css'> body,td,th { font-family: Arial, Helvetica, sans-serif; font-size: 13px;}</style>";
$message .= "<body>";
$message .= "<table width='650' border='1' cellspacing='0' cellpadding='6'> ";
$message .= "<tr>";
$message .= "<td colspan='2' bgcolor='#6495ed' style='font-weight: bold;'>CONTACT DETAILS</td>";
$message .= "</tr>";
$message .= "<tr>";
$message .= "<td width='237'>Client Name:</td>"."<td width='393'>".$name."</td>";
$message .= "</tr>";
$message .= "<tr>";
$message .= "<td>Message:</td>"."<td>".$comment."</td>";
$message .= "</table><br><br>";
$message .= "</body>";
$message .= "</html>";
$this->email->from($email,$name);
$this->email->to('fredma@gmail.com','nfy@layeaketz.com');
$this->email->subject('New Contact Email from Client');
$this->email->message($message);
$this->email->send();
if($this->email->send()== TRUE){
echo'message sent';
}else{
echo'message not sent';
}