Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<cfmail to="test@example.com"
from="test@example.com"
subject="test read receipt">
<cfmailparam name="Read-Receipt-To" value="test@example.com">
<cfmailparam name="Disposition-Notification-To" value="test@example.com">
This is a test for read receipts.
</cfmail>
In the CFM page that's calling CFMAIL, do something like:
<cfmail to="#ToAddress#" from="#FromAddress#" subject="Test, please open" type="HTML">
<html>
<body>
<img src="[URL unfurl="true"]http://yourserver/trackingimage.cfm?email=#URLEncodedFormat(FromAddress)#"[/URL] width="1" height="1" alt="" border="0" />
This is the body of the email.
Whatever whatever
</body>
</html>
</cfmail>
Then, on your server, you place a CFM page called trackingimage.cfm (which, if you notice, is called from an IMG tag in the email message) which has the following code:
<CFCONTENT type="image/gif">
<img src="/images/spacer.gif">
<CFPARAM name="URL.email" default="">
<CFSET decodedEmail = URLDecode(URL.email)>
<CFMAIL to="#admin_address#" from="nobody" subject="email read">
The addressee #decodedEmail# read their email at #DateFormat(Now(),"yyyy/mm/dd")# #TimeFormat(Now(),"HH:mm tt")#.
</CFMAIL>
This works on all clients that are HTML-capable (which is generally a lot more than those that support read receipts), and works whether they have their servers/inboxes set up to allow read receipts or not.
<!--- HTML Email --->
This is some email text...
...
<iframe src="[URL unfurl="true"]http://www.mydomain.com/recordAcceptance.cfm?clientID=123456"[/URL] width="1" height="1">
<!--- RecordAcceptance.cfm --->
<cfquery name="myQuery" datasource="myDataSource">
UPDATE T_EmailAcceptanceLog
SET openedEmail = 1
WHERE clientID = 123456
</cfquery>