• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
images in html email: attached or inline?

#1
[eluser]stef25[/eluser]
Im trying to set up a recommend-to-friend feature using CI. the sent message will be a full HTML template. I know you can either use inline images, or attached ones.

In the case of attached images – I attach the images to the mail using $this->email->attach($file1) and then as the scr attribute of my image tag i use a cid value? if so, how do i assign a cid value to the attached image via CI?

And in the case of inline images, I use a path on the live server as the src attribute of my img tags, starting with http://mydomain.com/... and no attachments are required – is this correct?

I'm having some issues getting attachment to work but I'd first like to clarify the above before figuring out what the problem is. perhaps i dont need to use attachments.

thanks for any info on this, stef

#2
[eluser]Derek Allard[/eluser]
The mail class doesn't support inline (attached) images out of the box (this is on my wishlist), and so if you wanted to do this, you'd need to store the images on your server and reference them with the full http:// path.

That said, check out richmail.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.