ColdFusion 9.0 Resources |
submit commandTo send a message to a single destination address in an SMPP SUBMIT_SM PDU, the structure that you used in the Data parameter of a SendGatewayMessage function or the return variable of the CFC listener method has the following fields. For more information about these fields, see the documentation for the SUBMIT_MULTI PDU in the SMPP3.4 specification, which you can download from the SMS Forum at www.smsforum.net/. Required fields
Optional fieldsYou can set default values for the following optional fields in the SMS event gateway configuration file. For information on the default values, see Configuring an SMS event gateway in the Developing ColdFusion Applications.
The following optional fields do not have default values:
ExampleThe 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> |