Quicklinks
SMS Messaging Server is an SMS messaging framework that enables companies to send, receive and process SMS- and e-mail messages. The framework is designed support virtually any scenario where low-and high volume SMS messaging is required. Use SMS Messaging Server in the following scenarios:
SMS Messaging Server can be well integrated into VBScript environments. This document describes how the SMS Messaging Server can be integrated into VBScript projects.
Download ActiveXperts SMS Messaging Server from the ActiveXperts Download Site and start the installation. The installation guides you through the installation process.
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:
You're now able to write an ASP script to send/receive e-mail using SMS and MMS Toolkit.
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 and create the SMS Messaging Server API objects:
<object runat=server progid="AxMmServer.MessageDB" id="AxMessageDB"> </object> <object runat=server progid="AxMmServer.Constants" id="AxConstants"> </object>
Now, test if your new web site is working well with SMS Messaging Server 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:
Now, use the following piece of code in your DEFAULT.ASP page:
<object runat=server progid="AxMmServer.MessageDB" id="AxMessageDB"> </object> <object runat=server progid="AxMmServer.Constants" id="AxConstants"> </object> <html> <head> <title>SMS Messaging Server Test</title> </head> <body> SMS Messaging Server Message Database:<br> <% = AxMessageDB.DatabaseConnectionString %><br> </body> </html>
And test it with your favorite browser. The result should be like this:
(Click on the picture to enlarge)
You can now send an SMS messages.
The following ASP code shows how to send an SMS message:
<object runat=server progid="AxMmServer.MessageDB" id="AxMessageDB"> </object>
<object runat=server progid="AxMmServer.Constants" id="AxConstants"> </object>
<html>
<head>
<title>ActiveXperts SMS Messaging Server - Create new SMS Messages</title>
</head>
<body>
<h1>Create new SMS Message</h1>
<br>
<font color="#700000"><b>NOTE: Make sure that the anonymous IUSR_<COMPUTERNAME> user has Read&Write access to the Message Database!</b></font><br>
<br>
<%
AxMessageDB.Open()
Response.Write "Open, result: " & AxMessageDB.LastError & "<br>"
If( AxMessageDB.LastError = 0 ) Then
Set objMessage = AxMessageDB.Create()
Response.Write "Create, result: " & AxMessageDB.LastError & "<br>"
If( AxMessageDB.LastError = 0 ) Then
objMessage.Direction = AxConstants.MESSAGEDIRECTION_OUT
objMessage.Type = AxConstants.MESSAGETYPE_SMS
objMessage.Status = AxConstants.MESSAGESTATUS_PENDING
objMessage.ChannelID = 0 ' Any available channel capable of handling this message
objMessage.ScheduledTime = "" 'Immediate send
objMessage.Recipient = "+31625044454"
objMessage.Body = "SMS Messaging Server - VBScript Test SMS"
AxMessageDB.Save( objMessage )
Response.Write "Save, result: " & AxMessageDB.LastError & "<br>"
End If
End If
AxMessageDB.Close()
Response.Write "Database closed.<br>"
Response.Write "Ready.<br>"
%>
</body>
</html>