Using SMS and MMS Toolkit in an HTML form (MM4 Connection)

The SMS and MMS Toolkit is a software development kit (SDK) to enhance an application or script with SMS, MMS and Pager functionality. 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. 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 Arabic, Chinese, Hebrew, 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, Windows Powershell 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 HTML projects.

Step 1: Installation of the SMS and MMS Toolkit

When using HTML, there are two ways to install the SMS and MMS Toolkit on a client PC:

  • Automatically using HTML code;
  • Using the SMS and MMS Toolkit InstallShield installation.

Automatic installation using HTML code

You can install the SMS and MMS Toolkit automatically using the following HTML code on top of the HTML page:

     <object codebase="" 
	     classid="CLSID:054BA820-49CB-4C93-9128-F26BB73C226E" >

The MMS Toolkit will be installated automatically. The user will be asked to confirm the installation, because the DLL is coming from an untrusted site (
There are two ways to avoid prompting:

  • Add the ActiveX/COM location to the user's trusted sites. You can manage trusted manually (by using the Internet Explorer), through a logon script (by appyling the registry change from the logon script) or by using Active Directory Group Policies;
  • Use a trusted location for the DLL. For instance your Intranet site, because most probably this site has already been added to the list of trusted sites for all users.
  • Digitally sign the file and load it from your own website.

Manual installation using the SMS and MMS Toolkit installation procedure

On each client PC, 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 the MMS objects in HTML/JavaScript

You must use Javascript to declare and create the objects.

Use the following Javascript code to declare and create the MMS objects:

var objMmsProtocolMm4;
var objMmsMessage;
var objMmsSlide;
var objMmsConstants;

objMmsProtocolMm4 = new ActiveXObject ( "ActiveXperts.MmsProtocolMm4" );
objMmsMessage     = new ActiveXObject ( "ActiveXperts.MmsMessage" );
objMmsSlide       = new ActiveXObject ( "ActiveXperts.MmsSlide" );
objMmsConstants   = new ActiveXObject ( "ActiveXperts.MmsConstants" );

Step 3: Send MMS messages

You can now send MMS messages.

The following HTML code shows how to send a MMS:

    <META HTTP-EQUIV="CONTENT-Type" CONTENT="text/html;CHARSET=utf-8" >
    <object codebase="" 
	    classid="CLSID:054BA820-49CB-4C93-9128-F26BB73C226E" ></object>

    <title>ActiveXperts SMS and MMS Toolkit MM4 HTML/JavaScript Sample</title>
    <script language="JavaScript">

      function Send ()
        var objMm4Protocol = new ActiveXObject ( "ActiveXperts.MmsProtocolMm4" );
        var objMmsMessage  = new ActiveXObject ( "ActiveXperts.MmsMessage" );
        var objMmsSlide    = new ActiveXObject  ( "ActiveXperts.MmsSlide" );

        objMm4Protocol.Logfile             = "C:\\Mm4LogHttp.txt";
        objMm4Protocol.ProviderHost        = "";
        objMm4Protocol.ProviderPort        = 25;
        objMm4Protocol.ProviderAccount     = "mm4";
        objMm4Protocol.ProviderPassword    = "secret";
        objMm4Protocol.ProviderDomain      = "activexperts-labs.dom"
        objMmsMessage.AddRecipient         ( textRecipient.value );
        objMmsMessage.Subject              = textSubject.value;
        objMmsSlide.AddText                ( textMessage.value );
        objMmsSlide.AddAttachment          ( textAttachment.value );
        objMmsMessage.AddSlide             ( objMmsSlide );
        objMm4Protocol.Send                ( objMmsMessage );
        textResult.value = "SEND: ERROR " + objMm4Protocol.LastError + " : " 
		+ objMm4Protocol.GetErrorDescription ( objMm4Protocol.LastError );    
    <font face="verdana" size="2">
    <hr size="1" color="#707070">
    <b><font size="4">ActiveXperts SMS and MMS Toolkit MM4 HTML/JavaScript Sample</font></b>
    Send an MMS message to a recipient through SMTP (MM4 compliant provider required).
    <hr size="1" color="#707070">
    <table border="0" bgcolor="#f0f0f0" >
        <td valign="top">Recipient:</td>
          <input size="50" type="text" id="textRecipient" value="<enter recipient number>" ><br>
        <td valign="top">Subject:</td>
          <input size="50" type="text" id="textSubject" >
        <td valign="top">Message:</td>
          <textarea rows="3" id="textMessage" cols="38" >Hello, world</textarea>
        <td valign="top">Attachment:</td>
          <input size="50" type="file" id="textAttachment" >
        <td vAlign="top">Result:</td>
          <input size="50"  id="textResult" ></input>
   <input type="button" onclick="Send()" value="Send Message">
   <b>IMPORTANT:</b> Please press the button <b>only once</b>, and allow some time for the MMS to be processed.
   <hr size="1" color="#707070">

There are many working samples included with the product. You can also find them on the ActiveXperts FTP site: