Quicklinks
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:
MMS features:
Pager features:
This document describes how the SMS and MMS Toolkit can be integrated into HTML projects.
When using HTML, there are two ways to install the SMS and MMS Toolkit on a client PC:
You can install the SMS and MMS Toolkit automatically using the following HTML code on top of the HTML page:
<head>
<object codebase="http://www.activexperts.com/files/axmstool/axmsctrl.cab"
classid="CLSID:054BA820-49CB-4C93-9128-F26BB73C226E" >
</head>
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 (www.activexperts.com).
There are two ways to avoid prompting:
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.
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" );
You can now send MMS messages.
The following HTML code shows how to send a MMS:
<html>
<head>
<META HTTP-EQUIV="CONTENT-Type" CONTENT="text/html;CHARSET=utf-8" >
<object codebase="http://www.activexperts.com/files/XmsToolkit/ammsctrl.cab"
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 = "mmsc.activexperts-labs.com";
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 );
}
</script>
</head>
<body>
<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>
<br>
<br>
Send an MMS message to a recipient through SMTP (MM4 compliant provider required).
<br>
<br>
</b>
<br>
<hr size="1" color="#707070">
<br>
<table border="0" bgcolor="#f0f0f0" >
<tr>
<td valign="top">Recipient:</td>
<td>
<input size="50" type="text" id="textRecipient" value="<enter recipient number>" ><br>
</td>
<tr>
</tr>
<tr>
<td valign="top">Subject:</td>
<td>
<input size="50" type="text" id="textSubject" >
</td>
</tr>
<tr>
<td valign="top">Message:</td>
<td>
<textarea rows="3" id="textMessage" cols="38" >Hello, world</textarea>
</td>
</tr>
<tr>
<td valign="top">Attachment:</td>
<td>
<input size="50" type="file" id="textAttachment" >
</td>
</tr>
<tr>
<td vAlign="top">Result:</td>
<td>
<input size="50" id="textResult" ></input>
</td>
</tr>
</table>
<br>
<input type="button" onclick="Send()" value="Send Message">
<br>
<br>
<b>IMPORTANT:</b> Please press the button <b>only once</b>, and allow some time for the MMS to be processed.
</form>
</font>
<br>
<hr size="1" color="#707070">
</body>
</html>
There are many working samples included with the product. You can also find them on the ActiveXperts FTP site: ftp.activexperts-labs.com/samples/mobile-messaging-component.