codeignitorメールクラスを使用して、htmlビューではなくhtmlコードを表示するメールを使用して、codeignitorで添付ファイル付きのhtmlメールを送信する際に問題があります。
以下の構成でメールタイプをhtmlとして設定したのは私のコードです
$message="<p>test</p>";
$mail_to = "email@gmail.com";
$from_mail = $useremail;
$from_name = $userfname;
$reply_to = $useremail;
$subject = "Abstract Details";
$file_name = $datamail['varafile'];
$path = realpath('uploads/abstract');
// Read the file content
$file = $path.'/'.$file_name;
$config = array (
'protocol' =>'sendmail',
'mailtype' => 'html',
'charset' => 'utf-8',
'priority' => '1'
);
$this->load->library('email',$config);
$this->email->set_newline("\r\n");
$this->email->from($from_mail,$from_name);
$this->email->to($mail_to);
$this->email->subject($subject);
$this->email->message($message);
$this->email->attach($file);
if($this->email->send()){
echo "Mail send successfully";
}else{
echo "Error in sending mail";
}