PDA

Click to See Complete Forum and Search --> : using Winsock-Control with username/password


aneubauer
Mar 31st, 2000, 05:41 PM
Where do I have to set the needed username and password for tcp-connection (f.e. using a mailserver) ???

It would be nice, if someone can help me...

aneubauer

privoli
Apr 1st, 2000, 11:37 AM
You can't simply set a username/password for TCP/IP.
Its a raw socket client, and it wont support things like automatic login and stats etc...

But you can try..


Private Sub ConnectCmd_Click()
SckSocket.connect "mail.yourisp.com", 110
End Sub

Private Sub SckSocket_Connect()
SckSocket.SendData "user " & UsernameTxt.text & vbcrlf
DoEvents
SckSocket.SendData "pass " & PasswordTxt.text & vbcrlf
DoEvents
End Sub


That will successfully log you into your POP server.
Here are some more commands in case you are wondering...

+OK Welcome to the POP3 service

An example session is:
USER Fred [identify yourself]
PASS aBigSecret [prove your identity is correct]
LIST [display messages with size]
TOP 2 5 [display 5 lines of message 2]
DELE 2 [mark message 2 as deleted]
RETR 2 [mark message 2 as read]
RSET [cancel all changes]
QUIT [confirm all changes]

Other supported commands:
STAT [display mailbox size]
UIDL [display messages with unique-id]
UIDL n [display message with unique-id]
LIST n [display message with size]
NOOP [successfully do nothing]
HELP [display this information]

End of help