Validity Property

Description:

The Validity property defines the validity period of the outgoing text messages i.e. the maximum time for which the SMSC will hold a undeliverable message before discarding it.

   

Usage
  • ObjectName.Validity = strValidity
  • strValidity = ObjectName.Validity
Value Type String
Access Mode Read/Write
Valid Values
  • "5M", "10M", "15M" ... to...  "720M" (5 minutes to 720 minutes in intervals of 5 minutes)
  • "1H", "2H", "3H" ... to...  "24H"    (1 hour to 24 hours in intervals of 1 hour)
  • "1D", "2D", "3D" ... to...  "30D"    (1 day to 30 days in intervals of 1 day)
  • "1W", "2W", "3W" ... to...  "63W"  (1 week to 63 weeks in intervals of 1 week)
Default Value "24H" (24 Hours)

Usage Example:

Visual Basic / ASP (VBScript)
Dim objSMS As mCore.SMS, strMessage As String
Dim i As Integer, strPhone() As String, blnAllMsgsSent As Boolean
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.LogType = 2
objSMS.Port = "COM3"
objSMS.BaudRate = 19200
objSMS.Parity = "N"
objSMS.DataBits = 8
objSMS.StopBits = "1"
' It is not necessary to execute the 'Connect' method.
' Connection state is detected internally by mCore and
' the 'Connect' method is executed accordingly.
objSMS.Validity = "2D"
objSMS.LongMessage = 3
objSMS.SendRetry = 2
strPhone(0) = "+919811054321"
strPhone(1) = "9810056432"
strPhone(2) = "9812345678"
strPhone(3) = "+919820054321"
strPhone(4) = "+919832087654"
strMessage = "This is a test message to test send delay property."
blnAllMsgsSent = True
For i = 0 To 4
     objSMS.SendSMS strPhone(i), strMessage
     If objSMS.IsError(True, "My Application") Then
          blnAllMsgsSent = False
     End If
Next
If blnAllMsgsSent Then
     MsgBox "All messages sent successfully!"
Else
     MsgBox "At least one message was not sent!"
End If
' Disconnect method is executed internally
' whenever the SMS object is terminated.
Set objSMS = Nothing

  

Copyright © IG Logix Softech Pvt Ltd, All Rights Reserved