Dynamic Image As A email Signaure
Good Day All.
I have the following code the will randomly get an image from a folder.
It works Great.
Now what i would like to do is add that image as an inline image in my email signature.
eg
<img src="http://websiteadd/getsingle.cfm">
However this does not work.
here is the code of the CFM page.
<cfset imagesFolder = "#dirlocation##dirspace#images#dirspace#stock#dirspace#temp" />
<!--- code to look in directory, choose one image at random --->
<cfdirectory directory="#dirlocation##dirspace#images#dirspace#stock#dirspace#temp" filter="*.jpg" name="getPics" action="list"/>
<cfset maxrows = getPics.recordCount/>
<cfset startRow = randRange(1, maxrows)/>
<!--- if one or more photos was found --->
<cfif maxrows gt 0>
<div class="showPic">
<cfoutput query="getPics" startrow="#startRow#" maxrows="1">
<cfheader name="content-disposition" value="attachment; filename=#name#.jpg" />
<cfcontent file="#dirlocation##dirspace#images#dirspace#stock#dirspace#temp#dirspace##name#" type="image/jpg" />
<!---<cfimage action = "writeToBrowser" source="../images/stock/temp/#name#" format="jpg" />
<img src="../images/stock/temp/#name#"/>--->
</cfoutput>
</cfif>
Is there anyway to do this.
Regards
