SMSC Property

Description:

The SMSC property of message item indicates the service centre used by the sender to send the text message.

   

Usage
  • strSMSC = ObjectName.Inbox.Message(Index).SMSC
  • strSMSC = ObjectName.Inbox(Index).SMSC
Value Type String
Access Mode Read Only
Remarks
  • This SMSC property has different meaning from the SMSC property of mCore™ object. The later is used for sending messages using SendSMS method.
  • One of the uses of SMSC property of the message item can be to accept messages which have been sent only from subscribers of specific operators.

Usage Example:

Visual Basic / ASP (VBScript)
Dim objSMS As mCore.SMS, i As Integer
Set objSMS = New mCore.SMS
' You can also use Set objSMS = CreateObject("mCore.SMS")
' In case of ASP (VBScript) to create object use
' Set objSMS = Server.CreateObject("mCore.SMS")
' In ASP use Response.Write instead of MsgBox
objSMS.Port = "COM2"
objSMS.BaudRate = 57600
objSMS.Parity = "N"
objSMS.DataBits = 8
objSMS.StopBits = "1"
objSMS.Inbox.Concatenate = True
objSMS.MessageMemory = "SM"
objSMS.Inbox.Refresh
If objSMS.Inbox.HasMessages Then
     MsgBox "Total " & objSMS.Inbox.Count & " incoming messages!"
     For i = objSMS.Inbox.Count To 1 Step -1
          If objSMS.Inbox.Message(i).SMSC <> "+919811099988" Then
               objSMS.Inbox.Message(i).Delete
          Else
               MsgBox objSMS.Inbox.Message(i).TimeStampRFC & _
               vbCrLf & "From: " & objSMS.Inbox.Message(i).Phone _
               & vbCrLf & objSMS.Inbox.Message(i).Text
          End If
     Next
End If
Set objSMS = Nothing

  

Copyright © IG Logix Softech Pvt Ltd, All Rights Reserved