User Guide

SMS gateway message sending commands 1047
Example
The following example onIncomingMessage method of a listener CFC uses the submit
command to echo incoming SMS messages to the message originator:
<cffunction name="onIncomingMessage" output="no">
<cfargument name="CFEvent" type="struct" required="yes">
<!--- Create a return structure that contains the message. --->
<cfset retValue = structNew()>
<cfset retValue.command = "submit">
<cfset retValue.destAddress = arguments.CFEvent.originatorid>
<cfset retValue.shortMessage = "Echo: " & CFEvent.Data.MESSAGE>
<!--- Send the message back. --->
<cfreturn retValue>
</cffunction>