1) Telling if someone has opened the email - afaik, this will only work with html emails, and will possibly trigger some spam filters, but you can link to an image that is actually a .cfm file which records any requests to it. Pseudo code:
<img src="http://www.domain.com/emailTrack.cfm?mailer=#qry_getMailing.mailingID#& [email protected]" height="1" width="1"> Then emailTrack.cfm looks something like this (or stick this in a cfc as a function and call it from emailTrack.cfm: <cftransaction> <cfquery name="qGetOpenCount" datasource="#dsn#" maxrows="1"> SELECT opens,mailingID FROM tbl_mailouts WHERE mailingID = #url.mailer# </cfquery> <cfif qGetOpenCount.RecordCount GT 0> <cfset newcount = qGetOpenCount.opens + 1> <cfquery name="qUpdateOpens" datasource="#dsn#"> UPDATE tbl_mailouts SET opens = #newcount# WHERE mailingID = #url.mailer# </cfquery> </cfif> </cftransaction> 2) Unsubscribing. Give them a link to a page which grabs their email address and unsubs them - add their email address as a url variable to the link. You might want to both remove them from your email list, and add them to an unsubscribe table to make sure they can't get resubbed by accident. HTH Will -----Original Message----- From: John Barrett [mailto:[email protected]] Sent: 20 January 2010 23:11 To: cf-newbie Subject: when cfmail is viewed hi, I have a mailing list I made in ColdFusion (http://www.gotnutrients.net/email_alerts/subscribe.cfm) Everything is working fine, but I would like to add a few things to it, and posting here to get idea on how: (1) how do I get informed that somebody has opened their mail (2) would also like to write something to flag the DB when somebody un-subscrbices too. Thanks, Johnny ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4937 Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
