Image Embedded Email Body - Code Igniter |
I'm having difficulty attaching an image to the body of the email using a standard library of the igniter code.
I already did this: Code: $cid = $this->email->attach('media/teste.jpg','inline'); view: Code: <img src='cid:<?= $cid?>' alt="photo1" height="42" width="42" />' In case the attachment happens, but in the view the image in the body does not appear. Can anyone help?
I think it is very much similar with your query follow this https://stackoverflow.com/questions/3184...odeigniter
Thank you all for your help.
I was able to sort through the documentation. https://www.codeigniter.com/user_guide/l...email.html $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(); }
(08-09-2018, 10:54 AM)vitor1415 Wrote: Thank you all for your help.
Did you manage to embed image while using an email template? The above works but not in case of template. Appreciate your help.
Maybe this will help you with an email template.
Notice the $data array... How to send email using HTML templates in Codeigniter What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |