<cfmail to="XXXX@XX.com"
from="XXXX@XX.com"
subject="Test tracker"
type="HTML">
<img src="http://yourdomain.com/image.cfm?id=1234" />
</cfmail>
<cfquery>
insert into user_email (
user_id,
email,
subject
) values (
1234,
'XXXX@XX.com',
'Test tracker'
);
</cfquery>
<cfif structkeyexists(url,"id")>
<cfset tm = dateformat(now(),"mm/dd/yyyy") &" "& timeformat(now(),"hh:mm:ss") />
<!--- update users table with current date and time,
and set flag to true of the User id equal to Url.id --->
<cfquery>
update user_email
set dateopened = #tm#, opened = 1
where userid = #url.id#
and subject='Test tracker'
and coalesce(opened, 0) = 0;
</cfquery>
<cfset imgfile = "#GetDirectoryFromPath(ExpandPath('*.*'))#h1.jpg" />
<cfcontent type="image/jpeg" file="#imgfile#" />
</cfif>
<cflocation url="h1.jpg" addtoken="false" />
#GetDirectoryFromPath(ExpandPath('*.*'))#
(
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_c_11.html)
<cfcontent type="image/jpeg" file="#imgfile#" />
Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.
Comments (0)