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 |
|
| Value Type | Integer |
| Access Mode | Read/Write |
| Valid Values |
|
| Default Value | 3 |
| Remarks |
|
| 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 |