Home > Language Reference > Classes > Telephony
SendSMS Method
Sends a SMS.
Syntax
Public Sub SendSMS(ByRef objSMS As Sms)
| Parameter | Description |
| objSMS | SMS to send. |
Remarks
The SendSMS method sends a message. The objSMS parameter is a Sms object whose fields specify the message body, the recipient and the validity period of the message. The phone must be attached to the network before you can call this method, otherwise a runtime error occurs.
The following example sends a message:
Private Sub Button1_Click() Dim t As New Telephony Dim s As New Sms s.PhoneBook=New PhoneBook s.PhoneBook.Number="123456789" s.Message="Sample text" t.SendSMS s End Sub
The method does not return until the message is successfully sent, which may take a few seconds. It may be a good practice to provide users some visual feedback to inform them a lengthy operation is in progress.
System requirements
| System | Minimal version | Remarks |
| Palm OS | Palm OS 5.0 | Only available on smart phone devices. |