Hi,
I have this code:
Local iMsg,iConf
Declare SHORT InternetGetConnectedState In wininet.Dll;
INTEGER @lpdwFlags, Integer dwReserved
lConnect=displayState()
If lConnect
iMsg = Createobject("CDO.Message")
iConf = Createobject("CDO.Configuration")
Flds = iConf.Fields
With Flds
.Item(" = 2
.Item(" = '999.999.9.99' &&Brutus IP
.Item(" = 25
.Update()
Endwith
With iMsg
.Configuration = iConf
.To = "me@me.com"
.CC = ""
.BCC = ""
.From = m.emal
.Subject = "Test "
.Fields("Priority").Value = 1 && -1=Low, 0=Normal, 1=High
.Fields.Update()
.TextBody = "NEW INTERNET ORDER SUBMITTED"
.Send()
Endwith
iMsg = .Null.
iConf = .Null.
Flds = .Null.
Else
Messagebox("Could not send the message, your internet connection is down.")
Endif
Procedure displayState
Local lConnected
lConnected = .F.
lpdwFlags = 0
If InternetGetConnectedState (@lpdwFlags, 0) = 1
lConnected = .T.
Endif
Return lConnected
Endproc
I've masked the IP address for security reasons but my problem is that I get an message message saying:
Could not send the message, your internet connection is down
BUT it's not really down. I can surf with no problem. Actually, the problem is it's not working on 1 computer (the 1 I get the error message) but it's OK on another (even though I can surf on it).
Please help on what the problem could be.
Any help please.
Thanks,
FOXUP
I have this code:
Local iMsg,iConf
Declare SHORT InternetGetConnectedState In wininet.Dll;
INTEGER @lpdwFlags, Integer dwReserved
lConnect=displayState()
If lConnect
iMsg = Createobject("CDO.Message")
iConf = Createobject("CDO.Configuration")
Flds = iConf.Fields
With Flds
.Item(" = 2
.Item(" = '999.999.9.99' &&Brutus IP
.Item(" = 25
.Update()
Endwith
With iMsg
.Configuration = iConf
.To = "me@me.com"
.CC = ""
.BCC = ""
.From = m.emal
.Subject = "Test "
.Fields("Priority").Value = 1 && -1=Low, 0=Normal, 1=High
.Fields.Update()
.TextBody = "NEW INTERNET ORDER SUBMITTED"
.Send()
Endwith
iMsg = .Null.
iConf = .Null.
Flds = .Null.
Else
Messagebox("Could not send the message, your internet connection is down.")
Endif
Procedure displayState
Local lConnected
lConnected = .F.
lpdwFlags = 0
If InternetGetConnectedState (@lpdwFlags, 0) = 1
lConnected = .T.
Endif
Return lConnected
Endproc
I've masked the IP address for security reasons but my problem is that I get an message message saying:
Could not send the message, your internet connection is down
BUT it's not really down. I can surf with no problem. Actually, the problem is it's not working on 1 computer (the 1 I get the error message) but it's OK on another (even though I can surf on it).
Please help on what the problem could be.
Any help please.
Thanks,
FOXUP