Download ActiveXperts SMS and MMS Toolkit 5.1  (6799 KB - .exe file)
Download Manual  (623 KB - .htm file)
Using SMS and MMS Toolkit with ASP 2.x
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 ASP 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 Web Site
First, create a new directory on the IIS Server's file system. This directory will hold the ASP later on.
From the 'Start menu', click on 'Administrative Tools' and click on 'Internet Information Services (IIS) Manager'. Right-click on the 'Web Sites' container and choose 'New->Web Site':

(Click on the picture to enlarge)
The 'Web Site Creation Wizard' is shown, guiding you thorugh the process of creating a new web site. Provide all necessary information:
- Description - a froendly description of the new site;
- IP / Port / Host Header - choose your preferred way to distinguish between other web sites on the server;
- Path - select the directory that will store the ASP file(s);
- Web Site Access Permissions - in the Web Site Access Permissions dialog, enable 'Read' and 'Run scripts (such as ASP)';
You're now able to write an ASP script to send MMS content using the ActiveXperts SMS and MMS Toolkit.
Step 3: Create the SMS and MMS Toolkit objects in ASP
Create a new ASP script called DEFAULT.ASP in the directory that was created in Step2, using your favorite editor.
On top of the ASP code, insert the following lines to declare the MMS objects:
<%
Dim objMmsConstants
Dim objMm4Protocol
Dim objMmsMessage
Dim objMmsSlide
%>
Insert the following lines to create the objects:
<%
Set objMmsConstants = Server.CreateObject ( "ActiveXperts.MmsConstants" )
Set objMm4Protocol = Server.CreateObject ( "ActiveXperts.MmsProtocolMm4" )
Set objMmsMessage = Server.CreateObject ( "ActiveXperts.MmsMessage" )
Set objMmsSlide = Server.CreateObject ( "ActiveXperts.MmsSlide" )
%>
Step 4: Test a small piece of ASP
Now, test if your new web site is working well with the SMS and MMS Toolkit using your browser.
If you are using Microsoft Internet Explorer, it is recommended to disable friendly error message because this default setting doesn't show any ASP error message, making it hard to debug if there are any problems:
- Choose' Internet Options' from the 'Tools' menu;
- Select the 'Advanced' tab;
- In the 'Browsing' folder, de-select the 'Show friendly HTTP error messages' option;
- Click 'OK' to close the dialog.
Now, use the following piece of code in your DEFAULT.ASP page:
<%
Dim objMmsConstants
Dim objMm4Protocol
Dim objMmsMessage
Dim objMmsSlide
%>
<%
Set objMmsConstants = Server.CreateObject ( "ActiveXperts.MmsConstants" )
Set objMm4Protocol = Server.CreateObject ( "ActiveXperts.MmsProtocolMm4" )
Set objMmsMessage = Server.CreateObject ( "ActiveXperts.MmsMessage" )
Set objMmsSlide = Server.CreateObject ( "ActiveXperts.MmsSlide" )
%>
<html>
<head>
<title>MMS Toolkit Demo</title>
</head>
<body>
MMS Toolkit version: <% = objMm4Protocol.Version %><br>
MMS Toolkit expiration date: <% = objMm4Protocol.ExpirationDate %><br>
</body>
</html>
And test it with your favorite browser. The result should be like this:

(Click on the picture to enlarge)
Step 5: Send MMS messages
You can now send MMS messages using an SMTP connection to an MMSC.
The following ASP code generates a website where the user can choose a GIF image,
and send it as a MMS message to his mobile phone or email address.
The demo can be run from a client connecting to the ASP webserver. The client does not need any additional hardware.
The modem has to be connected to the webserver.
The following ASP code shows how to send a MMS:
<%@ CodePage=65001%>
<% Option Explicit %>
<object runat="server" progid="ActiveXperts.MmsProtocolMm4" id="objMm4Protocol"> </object>
<object runat="server" progid="ActiveXperts.MmsMessage" id="objMessage"> </object>
<object runat="server" progid="ActiveXperts.MmsSlide" id="objSlide"> </object>
<object runat="server" progid="ActiveXperts.MmsConstants" id="objConstants"> </object>
<html>
<head>
<title>MMS via MM4 - ASP Sample</title>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<style>
.clbody {
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:9pt;
font-weight:normal;
}
.clfooter {
font-family:Verdana;
font-size:7pt;
font-weight:normal;
}
h1, .h1 {
width:100%;
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:18px;
font-weight:bold;
}
hr, .hr {
color:#b0b0b0;
}
</style>
</head>
<body class="clbody">
<h1>MMS via MM4 - ASP Sample</h1>
<div style="WIDTH:700px">
MM4 requires connectivity to an MMSC through the internet/VPN. The protocol is based on SMTP, messages are MIME encoded.<br>
For more details about using SMS and MMS Toolkit with ASP, <a target="_blank" href="http://www.activexperts.com/support/xmstoolkit#asp">
click here</a>.<br>
</div>
<hr size="1">
<%
Dim numLastError, strLastError, strReply
numLastError = 0
strLastError = ""
strReply = ""
If( Request( "CTL_SEND" ) <> "" ) Then
objSlide.Clear()
objSlide.AddText( Request( "CTL_MESSAGE" ) )
objSlide.AddAttachment Request( "CTL_ATTACHMENT" ) , 0
objMessage.Clear()
objMessage.AddRecipient Request( "CTL_RECIPIENT" ), objConstants.asMMS_RECIPIENT_TO
objMessage.From = Request( "CTL_SENDER" )
objMessage.Subject = Request( "CTL_SUBJECT" )
objMessage.AddSlide(objSlide)
objMm4Protocol.Clear()
objMm4Protocol.ProviderHost = Request( "CTL_HOST" )
objMm4Protocol.ProviderPort = Request( "CTL_PORT" )
objMm4Protocol.ProviderDomain = Request( "CTL_DOMAIN" )
objMm4Protocol.ProviderAccount = Request( "CTL_ACCOUNT" )
objMm4Protocol.ProviderPassword = Request( "CTL_PASSWORD" )
' objMm4Protocol.LogFile = "c:\mmsmm4.log"
objMm4Protocol.Send( objMessage )
numLastError = objMm4Protocol.LastError
strLastError = objMm4Protocol.GetErrorDescription( numLastError )
End If
%>
<form action="default.asp" method="post">
<table class ="clbody" width="700">
<tr>
<td valign="top">Host:</td>
<td valign="top"><input style="width: 200px" type="text" name="CTL_HOST" value=<% If Request( "CTL_HOST" ) = "" Then %>"[Host]"<% Else %><% = Request( "CTL_HOST" ) %><% End If %>>:<input style="width: 30px" type="text" name="CTL_PORT" value=<% If Request( "CTL_PORT" ) = "" Then %>"25"<% Else %><% = Request( "CTL_PORT" ) %><% End If %>></td>
</tr>
<tr>
<td valign="top">Domain:</td>
<td valign="top"><input style="width: 250px" type="text" name="CTL_DOMAIN" value=<% If Request( "CTL_DOMAIN" ) = "" Then %>""<% Else %><% = Request( "CTL_DOMAIN" ) %><% End If %>></td>
</tr>
<tr>
<td valign="top">Account:</td>
<td valign="top"><input style="width: 250px" type="text" name="CTL_ACCOUNT" value=<% If Request( "CTL_ACCOUNT" ) = "" Then %>""<% Else %><% = Request( "CTL_ACCOUNT" ) %><% End If %>></td>
</tr>
<tr>
<td valign="top">Password:</td>
<td valign="top"><input style="width: 250px" type="text" name="CTL_PASSWORD" value=<% If Request( "CTL_PASSWORD" ) = "" Then %>""<% Else %><% = Request( "CTL_PASSWORD" ) %><% End If %>></td>
</tr>
<tr>
<td valign="top"> </td>
<td valign="top"> </td>
</tr>
<tr>
<td valign="top">Recipient:</td>
<td valign="top"><input style="width: 250px" type="text" name="CTL_RECIPIENT" value=<% If Request( "CTL_RECIPIENT" ) = "" Then %>"[Recipient]"<% Else %><% = Request( "CTL_RECIPIENT" ) %><% End If %>> <a target="_blank" href="http://www.activexperts.com/support/xmstoolkit?kb=Q5200015#Q5200015">Recipient number format</a></td>
</tr>
<tr>
<td valign="top">Sender:</td>
<td valign="top"><input style="width: 250px" type="text" name="CTL_SENDER" value=<% If Request( "CTL_SENDER" ) = "" Then %>""<% Else %><% = Request( "CTL_SENDER" ) %><% End If %>></td>
</tr>
<tr>
<td valign="top">Subject:</td>
<td valign="top"><input style="width: 250px" type="text" name="CTL_SUBJECT" value=<% If Request( "CTL_SUBJECT" ) = "" Then %>""<% Else %><% = Request( "CTL_SUBJECT" ) %><% End If %>></td>
</tr>
<tr>
<td valign="top">Message:</td>
<td valign="top"><input style="width: 250px" type="text" name="CTL_MESSAGE" value=<% If Request( "CTL_MESSAGE" ) = "" Then %>"[Message]"<% Else %><% = Request( "CTL_MESSAGE" ) %><% End If %>></td>
</tr>
<tr>
<td valign="top">Attachment:</td>
<td valign="top"><input style="width: 250px" type="text" name="CTL_ATTACHMENT" value=<% If Request( "CTL_ATTACHMENT" ) = "" Then %>"C:\Windows\System32\Setup.bmp"<% Else %><% = Request( "CTL_ATTACHMENT" ) %><% End If %>></td>
</tr>
<tr>
<td valign="top"> </td>
<td valign="top"><input 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:</td>
<td valign="top"><% = numLastError %>: <% = strLastError %></td>
</tr>
</table>
<br>
<br>
</form>
<hr size="1">
</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/ammstool.
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.
|