Hi,
I did this but I get error.Please help me .Thanks
test.cfm
<cfscript>
my_obj = CreateObject("component", "testfolder.components.testcfc");
objEmail=StructNew();
objEmail.email="123@msn.com";
objEmail.message ="hello";
my_obj.emailInfo();
</cfscript>
testcfc.cfc
<cfcomponent>
<cffunction name="emailInfo" returntype="boolean" access="remote">
<cfargument name="msgInfo" type="struct" required="true" />
<cfmail to = "#msgInfo.email#" from = "abc@gmail.com"
subject = "hello">
#msgInfo.message#
</cfmail>
<cfreturn true />
</cffunction>
</cfcomponent>
I did this but I get error.Please help me .Thanks
test.cfm
<cfscript>
my_obj = CreateObject("component", "testfolder.components.testcfc");
objEmail=StructNew();
objEmail.email="123@msn.com";
objEmail.message ="hello";
my_obj.emailInfo();
</cfscript>
testcfc.cfc
<cfcomponent>
<cffunction name="emailInfo" returntype="boolean" access="remote">
<cfargument name="msgInfo" type="struct" required="true" />
<cfmail to = "#msgInfo.email#" from = "abc@gmail.com"
subject = "hello">
#msgInfo.message#
</cfmail>
<cfreturn true />
</cffunction>
</cfcomponent>