I am trying to send email on codeigniter with attach file.
I always receive email successfully. However , I never receive with attach file. Below is code and highly
'smtp',
'smpt_host' => 'ssl://googlemail.com',
'smtp_port' => 465,
'smtp_user' => 'example@gmail.com',
'smtp_pass' => 'yourpass'
);
$this->load->library('email', $config);
$this->email->set_newline("\r\n");
$this->email->from('example@gmail.com');
$this->email->to('example@gmail.com');
$this->email->subject('This is a test email sending');
$this->email->message('This is some message, you can type your own');
if($this->email->send()
{
echo "Your email has been sent";
}else{
show_error($this->email->print_debugger());
}
}
?>