[rt-users] In Line Images in Emails

Emmanuel Lacour elacour at easter-eggs.com
Fri May 30 12:31:54 EDT 2014


On Fri, May 30, 2014 at 11:57:22AM +0100, Kevin Curtis wrote:
> 
>    We have found that whenever RT receives an email that contains an inline
>    image (internally or externally), any emails that get sent out by RT (for
>    example to the CC list or the requestor or the owner) the email that gets
>    sent out has the text/html section stripped of any html formatting and the
>    text is encased in a <pre> .. </pre> block.

html/body is stripped in RT::Transaction->Content, but not wrapped in
<pre> ...

can you send more information (test case) for this problem?

> 
>    There is not an image either.
> 

The problem appears when the image is referenced as src="cid:...". There is a
bug caused by the fact that RT changes multipart/related to
multipart/mixed that breaks displaying of inline images.


I worked a bit on this but did not found a beautiful fix (as a template
may makes reference to another Transaction content than the current one
...).

A quick fix is to hack RT::Transaction::Content so it looks for CIDs,
then try to find corresponding images attachments in
RT::Tickets->Attachments, then replaced the CID by
src="data:image...".


-- 
Easter-eggs                              Spécialiste GNU/Linux
44-46 rue de l'Ouest  -  75014 Paris  -  France -  Métro Gaité
Phone: +33 (0) 1 43 35 00 37    -   Fax: +33 (0) 1 43 35 00 76
mailto:elacour at easter-eggs.com  -   http://www.easter-eggs.com



More information about the rt-users mailing list