Home Play Pinja Bobbity flop

A blog about Ruby, Rails and other Tech. Mostly.

Back to blog

27th Jul 2006, 7:08pm
ActionMailer and embedding images in HTML emails - more

Manuel Holtgrewe wrote to me, and pointed me to his weblog where he notes the real cause of ActionMailer throwing away the Content-Id headers:

Mail uses its MessageIdHeader class to represent Content-Id headers. This class does some validation and is also used for the Message-Id header. Can you smell the problem already? Message ids must look like somestring@host but you would not assume that you have to format your content ids this way. If you format your Content-Id headers any other way then TMail will simply kick them out (I guess it throws some syntax errors but Rails is swallowing them silently).

So stick a @ in there, and all will be well.


Back to blog