The SendSMS method sends out a text message. The destination mobile number and the text message are specified as parameters of the method. The optional parameter AlertMessage specifies if the message should be displayed immediately on the recipients mobile phone (Flash Message).
| Usage | strResult = SendSMS(DestinationNumber, TextMessage, [AlertMessage]) |
| Parameters |
|
| Returns |
|
| Remarks |
DestinationNumber can be:
|
| 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 strMyMessage = "This is a test message" objSMS.SendSMS "+919873094767", strMyMessage ' To send the above as alert message use the following line: ' objSMS.SendSMS("+919873094767", strMyMessage, True) 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 |