ActiveXperts
SMS & MMS Toolkit


 Product Overview

 Supported Protocols:
 
 How to use

 Online Samples

 Download (.exe)

 Brochure (.pdf)

 Manual (.htm)

 Release Notes


Support

 Knowledge Base

 Forum

 Contact Support


Purchase

 Licensing

 Pricing

 Order now


Providers

 SMPP Providers

 MMS Providers

 TAP/UCP Providers

 SNPP Providers


Related documents

 Case studies

 SMS Documents

 GSM Network Codes

 TAPI Documents

 About Mobile
 Communications


 AT Commands

 RFC's


  Download ActiveXperts SMS and MMS Toolkit 5.1  (6826 KB - .exe file)
  Download Manual  (623 KB - .htm file)


Using the SMS and MMS Toolkit with ColdFusion / SMPP


The SMS and MMS Toolkit is a software development kit (SDK) to enhance an application or script with SMS, MMS and Pager functionality.
An SMS messages can be sent using a GSM/GPRS modem, an SMPP provider, an HTTP compliant SMS provider or using a standard dialup or fixed-line SMS modem.
An MMS messages can be sent via a GSM/GPRS modem (MM1), an SMTP server (MM4) or an XML/SOAP compliant provider (MM7).

SMS features:
  • Send and receive numeric- and alphanumeric text SMS messages
  • Verify delivery of outgoing SMS messages
  • Support for multimedia SMS messages, including ringtones, pictures and logo's
  • Support for WAP Push, WAP Bookmarks, vCards, voicemail/e-mail/fax/MMS indications
  • Support for Unicode, to support foreign languages like Chinese, Turkisch, etc.
  • Support for multi-part messages, to allow messages longer than 160 characters
  • Support for GSM modems, GSM phones, SMS/HTTP providers, SMPP (Short Message Peer to Peer) providers, TAP/XIO and UCP dial-in SMSC providers
  • Support Multi-threading environments. The component is thread-safe, which means it can be used in a multi-threaded environment
  • Samples included for various development platforms: MS Visual Basic, MS Visual Basic .NET, MS Visual C++, MS Visual Studio C# .NET, ASP, ASP .NET, Borland Delphi, Borland C++ Builder, ColdFusion and more
MMS features:
  • Support for many multimedia formats incl.: JPG, GIF, PNG, BMP, WBMP, TIF, WAV, MP3, MIDI, AC3, GP3, AVI, MPG, MP4, VCARD, VCALENDAR, JAR and more
  • Support for MM1 (MMS over WAP), MM4 (MMS over SMTP) and MM7 (MMS over HTML/SOAP)
Pager features:
  • Send alpha-numeric Pager messages through SNPP

This document describes how the SMS and MMS Toolkit can be integrated into ColdFusion projects.


Step 1: Download and install the SMS and MMS Toolkit

Download the SMS and MMS Toolkit from the ActiveXperts Download Site and start the installation. The installation guides you through the installation process.



Step 2: Create a new ColdFusion document

Create a new blank webdocument with the ".cfm" extention. First of all we are going to build the form whitch commands and properties of the device can be filled in. Then we are going to make a source code that connects to the device.



Step 3: Implementation

To use SMPP in ColdFusion, we need to use the Smpp object for sending/receiving SMS messages. We also need the constants object. Make sure the IUSR has the proper rights to create these activeX objects!

 <cfobject class="ActiveXperts.SmsProtocolSmpp" type="com" name="objSmppProtocol" Action="Create"> 
 <cfobject class="ActiveXperts.SmsConstants" type="com" name="objSmsConstants" Action="Create"> 
 <cfobject class="ActiveXperts.SmsMessage" type="com" name="objSmsMessage" Action="Create"> 


Step 4: Create a form

In case you’re sending your SMS messages using a SMPP provider, you’re dealing with some sort of a gateway. So in order to send a message you need to be connected to this gateway first. Therefore, create a simple ColdFusion form to collect the following data:

  • The servername
  • The serverport
  • The system ID ( username )
  • The password

Also collect the following data:
  • The recipient
  • The message data

Collect this data with a ColdFusion form. Make sure the fields listed above are required fields. Such a form might look like this:


<cfform method="post">
<table class ="clbody" width="700">
   <tr>
      <td valign="top" width="150">Server:</td>
      <td valign="top" width="550">
        <cfinput style="width: 187px" type="text" name="CTL_HOST" value="#host#"> :
        <cfinput style="width: 50px" type="text" name="CTL_HOSTPORT" value="#port#">
      </td>
   </tr>
   <tr>
      <td valign="top">System ID:</td>
      <td valign="top"><cfinput style="width: 250px" type="text" Required="Yes" name="CTL_SYSTEMID" value="#systemID#"></td>
   </tr>
   <tr>
      <td valign="top">Password:</td>
      <td valign="top"><cfinput style="width: 250px" type="text" Required="Yes" name="CTL_SYSTEMPASSWORD" value="#systemPassword#"></td>
   </tr>
   <tr>
      <td valign="top">System Type:</td>
      <td valign="top"><cfinput style="width: 250px" type="text" Required="Yes" name="CTL_SYSTEMTYPE" value="#systemType#"></td>
   </tr>
   <tr>
      <td valign="top">Source Address:</td>
      <td valign="top"><cfinput style="width: 250px" type="text" name="CTL_SOURCEADDRESS" value="#sourceAddress#"> 
                                                                                                     (will be displayed on the recipient's phone)</td>
   </tr>
   <tr>
      <td valign="top">Recipient:</td>
      <td valign="top"><cfinput style="width: 250px" type="text" Required="Yes" name="CTL_RECIPIENT" value=""> 
                       <a target="_blank" href="http://www.activexperts.com/support/xmstoolkit?kb=Q5300020##Q5300020">Recipient number format</a></td>
   </tr>
   <tr>
      <td valign="top">Message:</td>
      <td valign="top"><cfinput style="width: 250px" type="text" Required="Yes" name="CTL_MESSAGE" value=""></td>
   </tr>
   <tr>
      <td valign="top"> </td>
      <td valign="top"><cfinput  type="checkbox" name="CTL_UNICODE" value="uni" checked> Unicode</td>
   </tr>
   <tr>
      <td valign="top"> </td>
      <td valign="top"><cfinput size="25" type="submit" value="Send" name="CTL_SEND" style="height: 23px; width: 250px"></td>
   </tr>
   <tr>
      <td valign="top"> </td>
      <td valign="top"> </td>
   </tr>
      <tr>
      <td valign="top">Result code:</td>
      <td valign="top">#numLastError#: #strLastError#</td>
   </tr>
</table>
</cfform>

Step 5: Collect the submitted info and send the message.

If the ActiveX objects are being created succesfully and the user submitted his or her form properly, the message can be sent. To prevent errors because of incomplete forms, define the default values of all form fields. The code example below shows how to process the form data. First the Smpp object is initialized. The host, the port, the systemID and the password, the systemtype, the SystemSourceAddress and the SystemMode are configured. Now the object is ready to connect to the gateway. If the script has connected to the gateway, the message can be configured and sent to the recipient.

<cfset host = "smpp.activexperts-labs.com">
<cfset port = 2775>
<cfset systemID = "C6046231DB">
<cfset systemPassword = "EDB88EB2FE">
<cfset systemType = "SMPP">
<cfset sourceAddress = "+31638740160">
<cfset numLastError = 0>
<cfset strLastError = "">

<cfif( isDefined("FORM.CTL_SEND") )>
    <cfobject class="ActiveXperts.SmsProtocolSmpp" type="com" name="objSmpp" Action="Create">
    <cfobject class="ActiveXperts.SmsMessage" type="com" name="objMessage" Action="Create">
    <cfobject class="ActiveXperts.SmsConstants" type="com" name="objConstants" Action="Create">

    <cfparam name="FORM.CTL_HOST" default="">
    <cfparam name="FORM.CTL_PORT" default="2775">
    <cfparam name="FORM.CTL_SYSTEMID" default="">
    <cfparam name="FORM.CTL_SYSTEMPASSWORD" default="">
    <cfparam name="FORM.CTL_SYSTEMTYPE" default="">
    <cfparam name="FORM.CTL_SOURCEADDRESS" default="">
    <cfparam name="FORM.CTL_RECIPIENT" default="">
    <cfparam name="FORM.CTL_MESSAGE" default="">
    <cfparam name="FORM.CTL_UNICODE" default="">
		
    <cfscript>
        host = FORM.CTL_HOST; 
        port = FORM.CTL_PORT;
        systemID = FORM.CTL_SYSTEMID;
        systemPassword = FORM.CTL_SYSTEMPASSWORD;
        systemType = FORM.CTL_SYSTEMTYPE;
        sourceAddress = FORM.CTL_SOURCEADDRESS;
        recipient = FORM.CTL_RECIPIENT;
        message = FORM.CTL_MESSAGE; 

        objSmpp.Clear();
        objSmpp.Server = host;
        objSmpp.ServerPort = port;
        objSmpp.SystemID = systemID;
        objSmpp.SystemPassword = systemPassword;
        objSmpp.SystemType = systemType;
        objSmpp.SystemSourceAddress = sourceAddress;
        objSmpp.SystemMode = objConstants.asSMPPMODE_TRANSMITTER;

        objSmpp.Connect();
        numLastError = objSmpp.LastError;

        if( objSmpp.LastError eq 0 ){
            objMessage.RequestDeliveryStatus = 0;
            objMessage.Recipient = recipient;
            objMessage.Data = message;
            if ( FORM.CTL_UNICODE neq "" ){
               objMessage.Format = 20;
            }
            else{
               objMessage.Format = 0;
            }
        }

        objSmpp.Send( objMessage );
        numLastError = objSmpp.LastError;

        objSmpp.Disconnect();
 
        strLastError =  objSmpp.GetErrorDescription( numLastError );  
    </cfscript>
</cfif>


There are many working samples included with the product. You can also find them on the ActiveXperts FTP site: ftp.activexperts-labs.com/samples/xmstoolkit.




The ActiveXperts SMS and MMS Toolkit is a SMS development component (SDK). This control can be used by any Windows development platform, including Visual Basic .NET, Visual CSharp .NET, ASP .NET (VB,CS), ASP, Visual Basic, Visual Basic for Applications (VBA), Visual Studio/Visual C++, Borland Delphi and C++ Builder, PHP, ColdFusion, HTML, VBScript and any other ActiveX/COM compliant platform. The SMS and MMS Toolkit is an ActiveXperts Software B.V. Product.

Copyright ©1999-2007 ActiveXperts Software. All rights reserved.