-
I have some code that connects to my server but once it connects it sends some data that I have no idea what it's trying to do. It looks like it's the same info sent again and again about 10 times. Then it disconnects.
Goal:
-Connect to server
-Send an email
-Disconnect
I'm using PPP authenication.
Also, I need to use this dialer instead of Windows Dial-Up Connection. I have the code written for everything else except for this problem.
-
force a connection to your default ISP
Const Internet_Autodial_Force_Unattended As Long = 2
Public Declare Function InternetAutodial Lib "wininet.dll" (ByVal dwFlags As
Long, ByVal dwReserved As Long) As Long
Public Declare Function InternetAutodialHangup Lib "wininet.dll" (ByVal
dwReserved As Long) As Long
'Code:
Dim lResult As Long
lResult = InternetAutodial(Internet_Autodial_Force_Unattended, 0&)
--------------------------------------------------------------------------------
Or this way:
code:--------------------------------------------------------------------------------
Private Sub CmdConnect_Click()
Dim X
'"MyConnectionsName" is the name under the icon in Dial-up Networking
X = Shell("rundll32.exe rnaui.dll,RnaDial " & "MyConnectionsName", 1)
DoEvents
'You can type in your password before the { below.
SendKeys "{enter}", True
DoEvents
End Sub--------------------------------------------------------------------------------