Making a POP3 Client
The Winsock control also provides a Winsock1_Error event. This event gives us plenty of information about the error, helping us to tell the user what has happened. Here is a sample Winsock1_Error event procedure:
Private Sub Winsock1_Error(ByVal Number As Integer, _ Description As String, ByVal Scode As Long, _ ByVal Source As String, ByVal HelpFile As String, _ ByVal HelpContext As Long, CancelDisplay As Boolean) Msgbox "Error number: " & Number & vbCrlf & _ "Error Description: " & Description End Sub
The thing that I like very much about doing your own POP comms is that you can choose to leave the messages on the server. This way you can be on the road, download your email and read it, then reply to the important ones and delete them from the server so you know they are gone, and then disconnect leaving the rest of your mail intact, allowing you to pick it up back at the office/home. You could extend the sample program to store the email on your hard drive, so that you can look at it later.
Page 4 of 6