Dim DataToSend As String
Dim objXML As Object
Dim message As String
Dim authKey As String
Dim mobiles As String
Dim sender As String
Dim route As String
Dim unicode As String
Dim pe_id As String
Dim template_id As String
Dim URLAs String
'Set these variables
authKey = "Your auth key"
mobiles = "9999999999"
'Sender ID,While using route4 sender id should be 6 characters long.
sender = "TESTIN"
' this url encode function may not work fully functional.
message = URLEncode(" Your message ")
'Define route : Ex=: route=1 for promotional, route=4 for transactional SMS.
route = "4"
'SMS Language : Ex=: unicode=0 for English, unicode=1 for other language.
unicode = "0"
'Your approved Principal Entity Id.
pe_id = "12131313131313131"
IfLen(objXML.responseText) > 0 Then
MsgBox objXML.responseText
End If
End Sub
FunctionURLEncode(ByVal Text As String) As String
Dim i As Integer
Dim acode As Integer
Dim char As String
URLEncode = Text
For i =Len(URLEncode) To 1 Step -1
acode =Asc(Mid$(URLEncode, i, 1))
Select Case acode Case 48 To 57, 65 To 90, 97 To 122
' don't touch alphanumeric chars Case 32
' replace space with "+"
Mid$(URLEncode, i, 1) = "+" Case Else
' replace punctuation chars with "%hex"
URLEncode = Left$(URLEncode, i - 1) & "%" & Hex$(acode) & Mid$ _
(URLEncode, i + 1)
End Select
Next