<cffunction name="sendData" access="public" output="true" returntype="boolean" hint="System generated function: mails submitted data to form owner">
	<cfargument name="userID" type="uuid" required="true" hint="Requires userID of form submitter">
	<cfargument name="formName" type="string" required="true" hint="Requires the name of this form">
	<cfargument name="formOwner" type="uuid" required="true" hint="Requires the userID of the form owner">
	
	<cfscript>
		//  we'll need a user object
		thisUser=createObject("component","cfcm.system.user");
		// now get the properties for this component
		lProps=getProps();
		// create the initial mail strings
		strSubj="New '" & arguments.formName & "' form submission";
		strMail="There is a new form submission for your form '" & arguments.formName & "'." & chr(13)
		& thisUser.getFullName(arguments.userID) & " has submitted the following data." & chr(13) & chr(13);
		// now make the data table
		for(i=1; i LTE listLen(lProps); i=i+1) {
			thisProp=listGetAt(lProps,i);
			if(thisProp NEQ 'persistIn' AND thisProp NEQ 'id') {
				if(isDefined('strData')) {
					strData=strData & thisProp & ": " & this[thisProp] & chr(13);
				}
				else {
					strData=thisProp & ": " & this[thisProp] & chr(13);
				}
			}
		}
		// and append that to the mail string...
		strMail=strMail & strData;
		// so we can notify the form owner
		thisUser.sendMessage(arguments.formOwner,strSubj,strMail);
	</cfscript>

<cfreturn true>
</cffunction>