Inbox Method

Description:

Inbox method returns the Inbox collection object which contains the incoming SMS messages.

   

Usage Set objInbox = ObjectName.Inbox
Parameters None
Returns The Inbox Collection object

Usage Example:

Visual Basic / ASP (VBScript)
Dim objSMS As mCore.SMS, objInbox As Inbox, Message As Message
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"
Set objInbox = objSMS.Inbox
objInbox.Concatenate = True
objSMS.MessageMemory = "SM"
objInbox.Refresh
If objInbox.HasMessages Then
     MsgBox "Total " & objInbox.Count & " incoming messages!"
     For Each Message In objInbox
          MsgBox Message.TimeStampRFC & vbCrLf & "From: " _
                 & Message.Phone & vbCrLf & Message.Text
     Next
End If
Set objSMS = Nothing

  

Copyright © IG Logix Softech Pvt Ltd, All Rights Reserved