I am trying to send emails from visual basic (vb6 sp6). The problem is that my pc has two ip addresses (one ip is for a control network and the other one is for the internet connection) and the winsock is using the wrong one (the one for the control network). How can I force the winsock control to use the internet ip address in order to avoid connection problems? I am using the mswinsck.ocx control.
here is my code:
mvarWinsock.RemoteHost = mvarSmtpServer
mvarWinsock.RemotePort = 25
mvarWinsock.Protocol = sckTCPProtocol
When i take a look at the LocalIP property i can see that it is set to the control network ip.
can someone help me please?
Thanks in advance.
0 · ·