attachment_cid($filename)
| Parameters: |
|
|---|---|
| Returns: |
Attachment Content-ID or FALSE if not found |
| Return type: |
string |
Sets and returns an attachment’s Content-ID, which enables your to embed an inline (picture) attachment into HTML. First parameter must be the already attached file name.
$filename = '/img/photo1.jpg';
$this->email->attach($filename);
foreach ($list as $address)
{
$this->email->to($address);
$cid = $this->email->attachment_cid($filename);
$this->email->message('<img src="cid:'. $cid .'" alt="photo1" />');
$this->email->send();
}
Note
Content-ID for each e-mail must be re-created for it to be unique.
Please login to continue.