Embed an attached image in the HTML body

110 views
Skip to first unread message

Sean Mackesey

unread,
Jun 23, 2013, 9:10:23 PM6/23/13
to pon...@googlegroups.com
Hello, I'm trying to embed an attached image in the html-body of an email I'm building with Pony.  This stack overflow question has led me to conclude that I need to use the Content-Id of the attached image as the src for the html img tag.  I'm not sure how to control this with Pony (or any other Ruby mail library, for that matter).  When I look at the source of what Pony generates, I see a long, random string for the Content-Id.  Is there a way that I can either access this string or set the id myself?  Thanks. 

Ben Prew

unread,
Jun 27, 2013, 1:28:54 PM6/27/13
to pon...@googlegroups.com
Sean,

Pony 1.5 (which I just pushed) will specify the content-id of attachments as "<#{attachment_filename}@#{hostname}>"

You can see the full commit here:


Thanks

--Ben


On Sun, Jun 23, 2013 at 6:10 PM, Sean Mackesey <s.mac...@gmail.com> wrote:
Hello, I'm trying to embed an attached image in the html-body of an email I'm building with Pony.  This stack overflow question has led me to conclude that I need to use the Content-Id of the attached image as the src for the html img tag.  I'm not sure how to control this with Pony (or any other Ruby mail library, for that matter).  When I look at the source of what Pony generates, I see a long, random string for the Content-Id.  Is there a way that I can either access this string or set the id myself?  Thanks. 

--
 
---
You received this message because you are subscribed to the Google Groups "Ponyrb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ponyrb+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages