Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Winsock problem: My computer has two IPs!!!
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 · ·