On Mon, Feb 8, 2010 at 5:00 PM, Maureen <[email protected]> wrote: > > My take on this > 1. CFMAIL is a tag. It might have properties beyond a standard tag, > but it's still a tag, and works with tag syntax. > 2. Calling it from the script exposes it as a object not a component. > 3. Unless you can call it with cfinvoke, and have control over > parameters and return data type, calling it a component (cfc) is not > an accurate description, even if Abode is doing it.
As of CF9, you can call it with cfinvoke. Or at least I assume you can, since you can call it with CreateObject. I haven't actually tried it with cfinvoke. As near as I can tell, they rewrote the internals of the service tags and created, well, services out of them and then kept the tag syntax in place but changed the guts of the tag to do an object invocation. See documentation for mail here: http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSe9cbe5cf462523a0693d5dae123bcd28f6d-7ff9.html You can do an object invocation ( createObject("component", "mail") ) and then use setters on it. It looks like cfmail (the tag) now just wraps the object invocation, so that when you do <cfmail to="[email protected]"> it is internally doing: mailservice = new mail(); mailservice.setTo = attributes.to; mailservice.send() ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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-community/message.cfm/messageid:311877 Subscription: http://www.houseoffusion.com/groups/cf-community/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5
