Skip to main content
Inspiring
November 6, 2011
Question

How to render cids images

  • November 6, 2011
  • 1 reply
  • 715 views

I have an email read with CFPOP, with 2 embeded images.

I did a cfdump of the cids :

I can see the 2 images names and cids,

But is it possible to render at least one image in the webmail via the CFPOP ?

Thanks for help.

This topic has been closed for replies.

1 reply

plartsAuthor
Inspiring
November 19, 2011

Here is part of the solution : Working when cids files are loaded.

The image src is like : cid:image001.png@01CCA61F.1FB8E630

<cfloop collection="#cids#" item="x">


      <cfset i=#findnocase("<",cids)#>

      <cfif i is not 0>
       <cfset j = findnocase(">",cids,i)>
       <cfif j is not 0>
        <cfset cid1=removechars(cids,j,len(cids))>
        <cfset cid1=removechars(cid1,1,i)>
        <cfset cid1="cid:" & cid1>

        <cfset at_file=http_start & "/attach_Rec/" & x>     <!--- full path of the downloaded file --->
        <cfset tbody=replacenocase(body,cid1,at_file)>
       </cfif>
      </cfif>
   </cfloop>

There is may be an other solution in new tags or CF functions ?

And when the CID file is not downloaded, this cannot not work.

The CID code should correspond to an Internet adress (http://xxxxxxx) but I do not know how to understand this CID.

The src image is like :

cid:part1.00020509.06000501@imagescreations.fr