Yeah thats how I thought it was working. It's just a mask, a façade class :)
-----Original Message----- From: Judah McAuley [mailto:[email protected]] Sent: Monday, February 08, 2010 8:28 PM To: cf-community Subject: Re: cf question Actually, it turns out that I was backwards. cfmail is not a wrapper for a new mail object, the new mail object is a wrapper for cfmail. If you take a look at (in a default install) c:\ColdFusion9\CustomTags\com\adobe\coldfusion\mail.cfc you will see what is being called when you do a CreateObject("component","mail") call. The file is unencrypted, btw. mail.cfc extends base.cfc and at the end of mail.cfc, do a call to the invokeTag function of base.cfc, telling it to go execute the tag that it is calling (cfmail) and then passes in all the parameters, etc. Essentially, base.cfc is a proxy for CF tags and then mail.cfc, ftp.cfc, etc all have shells to expose the particular setters/getters and validation appropriate for that particular tag/service. So cfmail is still a tag and mail is a service cfc that invokes it for you when you call it in cfscript. Judah On Mon, Feb 8, 2010 at 5:17 PM, Judah McAuley <[email protected]> wrote: > I think, in the end, the confusion is thus: > > Up to and including CF8, there was only one way to send mail and that > was using the cfmail tag. > > As of CF9, you can still use the cfmail tag, but you can also send > mail by using CreateObject("component", "mail") within cfscript. This > means that "mail" is a component, as you can see by the CreateObject > command and is thus rightly described as a CFC. It happens to be CFC > that is distributed with CF9, so I guess that's why they refer to it > as a System CFC. > > cfmail has probably been rewritten as a wrapper around this new mail > component, but I could be wrong. Regardless, cfmail is still a tag. > You could not do CreateObject("component", "cfmail") and have it work. > > So cfmail is a tag. mail is a system cfc. They both perform the same > functions and take the same arguments. The Service Browser would be > able to see mail but not see cfmail. > > The same is true for the other service objects, http, ftp, query, etc. > > A full list of service objects available in CF9 is here: > http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSe9cbe5cf462523a0693d5da e123bcd28f6d-8000.html > > Hope that helps, > Judah > > On Mon, Feb 8, 2010 at 5:06 PM, Dana <[email protected]> wrote: >> >> not to inject epistemology into this, but can an piece of software >> mislabel itself? I am asking. >> >> so would that make it not unlike an object which is an instance of a >> class in other languages? I am asking. >> >> I take it you cannot call cfmail with cfinvoke? Now I am really >> asking, as I dunno. >> >> On Mon, Feb 8, 2010 at 6: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. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:311887 Subscription: http://www.houseoffusion.com/groups/cf-community/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.5
