I'm going to be sending out promotions with custom HTML (generated in my rails app). I'm using the api defined here:
under the "But wait... I want to use my own HTML" section.
My problem is getting images embedded in the html properly.
I've tried embedding images in the html like this:
<img alt="My Image" border="0" height="80" src="data:image/gif;base64,R0lGODlhTgJQAMQAA...">
But that doesn't load properly in many email clients. I'd like to add the images as inline attachments like this:
----==_mimepart_51e7238b9494a_121f43fe894c6066c69780
Content-Type: image/gif;
charset=UTF-8;
filename=btn.gif
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename=btn.gif
Content-ID: <51e7238b23ea3_121f...@nate.local.mail>
R0lGODlh3AAsAMQAAPitlvzWyvWDYf718vNvRvJkOfzg1/3q5faYe/m3o/WO
bvR5VPrBsPm3oveiiPvLvfeiifislfvWyv////FaLAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0I...
----==_mimepart_51e7238b9494a_121f43fe894c6066c69780--
And then reference the image in the html with:
<img src=\"cid:51e7238b23ea3_121f...@nate.local.mail\" />
FYI, I'd prefer to keep my images in my app than somewhere like s3.
Thanks for your help.