Adobe COLDFUSION 9 Manual page 1306

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using External Resources
You can also set optional fields in the structure, such as a field that requests a delivery receipt. For a complete list of
fields, see submit command in the CFML Reference. For detailed descriptions of 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/.
Note: To send long messages, you can separate the message into multiple chunks and use a submit command to send each
chunk separately. In this case, a CFC would use multiple
function.
Example: Using the submit command in sendGatewayMessage function
The following example from a CFM page uses a
send an SMS messages that you enter in the form. This example uses the SMS gateway that is configured in the
ColdFusion installation, and sends the message to the SMS client simulator.
<h3>Sending SMS From a Web Page Example</h3>
<cfif IsDefined("form.oncethrough") is "Yes">
<cfif IsDefined("form.SMSMessage") is True AND form.SMSMessage is not "">
<h3>Sending Text Message: </h3>
<cfoutput>#form.SMSMessage#</cfoutput><br>
<cfscript>
/* Create a structure that contains the message. */
msg = structNew();
msg.command = "submit";
msg.destAddress = "5551234";
msg.shortMessage = form.SMSMessage;
ret = sendGatewayMessage("SMS Menu App - 5551212", msg);
</cfscript>
</cfif>
<hr noshade>
</cfif>
<!--- begin by calling the cfform tag --->
<cfform action="command.cfm" method="POST">
SMS Text Message: <cfinput type="Text" name="SMSMessage" value="Sample text Message"
required="No" maxlength="160">
<p><input type = "submit" name = "submit" value = "Submit">
<input type = "hidden" name = "oncethrough" value = "Yes">
</cfform>
</body>
</html>
For a simple example of a listener CFC uses the
originator, see
"Incoming message handling
The submitMulti command
To send a single text message to multiple recipients using an SMPP SUBMIT_MULTI PDU, the Data parameter of a
function or the return variable of the CFC listener method normally has the following fields:
SendGatewayMessage
SendGatewayMessage
CFML function with a
sendGatewyMessage
command to echo incoming SMS messages to the message
submit
example" on page 1300.
Last updated 8/5/2010
functions, instead of the
cfreturn
command to
submit
1301

Advertisement

Table of Contents
loading

Table of Contents