Quicklinks
SMPP stands for Short Message Peer to Peer Protocol SMPP is used to send and receive messages from and to GSM, UMTS, iDEN, CDMA and TDMA cell phones. The protocol is a level-7 TCP/IP protocol, which allows fast deliver of SMS messages. Using the SMPP protocol instead of sending/receiving messages using a GSM modem has the following advantages:
The SmsProtocolSmpp object features the following:
The SmsProtocolSmpp object is part of the ActiveXperts SMS and MMS Toolkit component. Overview of all SMS and MMS Toolkit objects:
Set objSmppProtocol = CreateObject ( "ActiveXperts.SmsProtocolSmpp" ) Set objSmsMessage = CreateObject ( "ActiveXperts.SmsMessage" ) Set objConstants = CreateObject ( "ActiveXperts.SmsConstants" ) ' Set provider properties objSmppProtocol.Server = "smpp.activexperts-labs.com" objSmppProtocol.ServerPort = 2775 objSmppProtocol.SystemID = "mylogin" objSmppProtocol.SystemPassword = "topsecret" objSmppProtocol.SystemType = "SMPP" objSmppProtocol.ServerTimeout = 3000 objSmppProtocol.SystemMode = objConstants.asSMPPMODE_TRANSMITTER objSmppProtocol.Connect ' Connect If( objSmppProtocol.LastError <> 0 ) Then WScript.Quit End If ' Message: set all properties objSmsMessage.Clear objSmsMessage.Recipient = "+31625044454" ' Recipient's mobile number objSmsMessage.Format = objConstants.asMESSAGEFORMAT_TEXT ' Plain text objSmsMessage.Data = "ActiveXperts Test Message" ' Set message body ' Send the message strReference = objSmppProtocol.Send( objSmsMessage ) If( objSmppProtocol.LastError <> 0 ) Then objSmppProtocol.Disconnect WScript.Quit End If WScript.Echo "Message Reference: " & strReference ' Show the Message Reference objSmppProtocol.Disconnect
Imports AXmsCtrl
Module Module1
Sub Main()
Dim objSmppProtocol As SmsProtocolSmpp = New SmsProtocolSmpp
Dim objSmsMessage As SmsMessage = New SmsMessage
Dim objConstants As SmsConstants = New SmsConstants
Dim strMessageRef
objSmppProtocol.Clear()
' Set provider properties
objSmppProtocol.Server = "smpp.activexperts-labs.com"
objSmppProtocol.ServerPort = 2775
objSmppProtocol.SystemID = "mylogin"
objSmppProtocol.SystemPassword = "topsecret"
objSmppProtocol.SystemType = "SMPP"
objSmppProtocol.ServerTimeout = 3000
objSmppProtocol.SystemMode = objConstants.asSMPPMODE_TRANSMITTER
' Connect
objSmppProtocol.Connect()
Console.WriteLine("Connect, result: " & objSmppProtocol.LastError )
If (objSmppProtocol.LastError = 0) Then
' Message: set all properties
objSmsMessage.Clear
objSmsMessage.Recipient= "+31625044454" ' Recipient's mobile number
objSmsMessage.Format = objConstants.asMESSAGEFORMAT_TEXT ' Plain text
objSmsMessage.Data = "ActiveXperts Test Message" ' Set message body
' Send the message
strReference = objSmppProtocol.Send( objSmsMessage )
If( objSmppProtocol.LastError = 0 ) Then
Console.WriteLine("Message Reference: " + strMessageRef)
End If
objSmppProtocol.Disconnect()
End If
End Sub
End Module
Samples are available for: Visual Basic, Visual C/C++, VB .NET, VC# .NET, ASP, ASP .NET, Borland C++ Builder, Boland Delphi, ColdFusion, Java, Javascript, PHP, HTML and more.
On ftp.activexperts-labs.com, you can find many SMS and MMS Toolkit samples. Samples are also part of the SMS and MMS Toolkit installation.