I am trying to attach several images to the body of an email, however when the mail arrives the same image is shown on the body.
This is the script I'm using to scan the array images.
foreach ($attachment as $key => $value) {
$inlineFIle = $this->email->attach( $_SERVER["DOCUMENT_ROOT"] .'/'. $value->directorio . $value->nombre_archivo, 'inline');
$cid = $this->email->attachment_cid($inlineFIle);
$body .= "<img src='cid:". $cid ."' alt='picture' />";
}
If for example, I remove the line from the body, attach all the images correctly to the email, but without showing them inside the body of the message.
Any ideas?
Thanks!