This is my code
I do not get a error msg, but my sms is not send out.
can anyone help?
<%
Sub Delay(DelaySeconds)
SecCount = 0
Sec2 = 0
While SecCount < DelaySeconds + 1
Sec1 = Second(Time())
If Sec1 <> Sec2 Then
Sec2 = Second(Time())
SecCount = SecCount + 1
End If
Wend
End Sub
%>
<%
Dim MSComm1,Buffer
Set MSComm1=Server.CreateObject("MSCOMMLib.MSComm"
MSComm1.Settings = 9600
MSComm1.CommPort = 2
MSComm1.RThreshold = 1
MSComm1.SThreshold = 1
MSComm1.PortOpen = Not MSComm1.PortOpen
If MSComm1.PortOpen Then
response.write "Comm. Port " & MSComm1.CommPort & " Settings: " & MSComm1.Settings
Else
response.write "Comport Problem "
End If
MSComm1.Output = "AT+CMGF=1" & vbCrLf
Delay(0.2)
Buffer = MSComm1.Input
MSComm1.Output = "AT+CSCA=+6596845997" ' Set GSM service centre no. '
Delay(0.2)
Buffer = MSComm1.Input
MSComm1.Output = "AT+CMGS=97665234" 'phone number'
Delay(0.2)
Buffer = MSComm1.Input
MSComm1.Output = "Hello this is a test. pls reply if u recieve this message.Thanks" + Chr(26)
Delay(2)
Buffer = MSComm1.Input
MSComm1.Output = Buffer
%>
I do not get a error msg, but my sms is not send out.
can anyone help?
<%
Sub Delay(DelaySeconds)
SecCount = 0
Sec2 = 0
While SecCount < DelaySeconds + 1
Sec1 = Second(Time())
If Sec1 <> Sec2 Then
Sec2 = Second(Time())
SecCount = SecCount + 1
End If
Wend
End Sub
%>
<%
Dim MSComm1,Buffer
Set MSComm1=Server.CreateObject("MSCOMMLib.MSComm"
MSComm1.Settings = 9600
MSComm1.CommPort = 2
MSComm1.RThreshold = 1
MSComm1.SThreshold = 1
MSComm1.PortOpen = Not MSComm1.PortOpen
If MSComm1.PortOpen Then
response.write "Comm. Port " & MSComm1.CommPort & " Settings: " & MSComm1.Settings
Else
response.write "Comport Problem "
End If
MSComm1.Output = "AT+CMGF=1" & vbCrLf
Delay(0.2)
Buffer = MSComm1.Input
MSComm1.Output = "AT+CSCA=+6596845997" ' Set GSM service centre no. '
Delay(0.2)
Buffer = MSComm1.Input
MSComm1.Output = "AT+CMGS=97665234" 'phone number'
Delay(0.2)
Buffer = MSComm1.Input
MSComm1.Output = "Hello this is a test. pls reply if u recieve this message.Thanks" + Chr(26)
Delay(2)
Buffer = MSComm1.Input
MSComm1.Output = Buffer
%>