How do you use the email->attach function?
I can\'t figure what is happen, cos when i put the code for email->attach the mesage came in blank(the mail body) and ther
This is a late update, but it might be useful.
It was said twice
"You can not directly attach a file from the upload field of your form to an email"
. However, this works fine in Codeigniter 3.0
foreach ($_FILES as $key => $file)
{
if ($file['error'] == 0)
{
$this->email->attach($file['tmp_name'], '', $file['name']);
}
}
(Though, the email is not sent and no errors are shown, if there are two files with the same name)