LongMessage Property

Description:

As per GSM specifications, the maximum number of characters allowed in a single text message is dependent on the type of character encoding as given below:

The LongMessage property defines how a message is to be treated if it exceeds the maximum permissible length.

   

Usage
  • ObjectName.LongMessage = intLongMessage
  • intLongMessage = ObjectName.LongMessage
Value Type Integer
Access Mode Read/Write
Valid Values
  • 0 - Truncate
    Truncates the outgoing text message to one message of length based on type of character encoding
  • 1 - Split
    Splits the message to multiple messages with each message length within the maximum size depending on character encoding
  • 2 - Formatted Split
    Same as 1, except that this mode adds a page number to each split part of outgoing message at the end of the message (e.g. Msg 1/2)
  • 3 - Concatenate
    Splits the outgoing message to multiple messages, which when received by the recipient, is displayed as one single message.
Default Value 3
Remarks
  • Permissible message length i.e. maximum number of characters allowed in a one single message is dependent on type of character encoding as defined in Character property
  • Mobile phone handsets that do not support concatenated messages, will display the received concatenated message as multiple messages.
  • If mode 2 is selected then the page number is not added if the message size is within the maximum permissible length.

Usage Example:

Visual Basic / ASP (VBScript)
Dim objSMS As mCore.SMS, strMyMessage As String
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
If objSMS.LogSize > 100 Then
     ClearLog(10)
End If
objSMS.LogType = 2
objSMS.Port = "COM3"
objSMS.BaudRate = 19200
' It is not necessary to execute the 'Connect' method.
' Connection state is detected internally by mCore and
' the 'Connect' method is executed accordingly.
objSMS.Character = 0
' You can change the value of the LongMessage property to
' different values to check results
objSMS.LongMessage = 3

strMyMessage = "This is a sample long message which exceeds _
               one hundred and sixty characters. This message _
               will be split to multiple messages, or split _
               with formatting, or concatenated to one message _
               according to the LongMessage property value"

objSMS.SendSMS "+919873094767", strMyMessage

If Not objSMS.IsError(True) Then
     MsgBox "Message 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