Click to See Complete Forum and Search --> : How do I check if I have got any new mail, through my program ?
Zleepy
Apr 9th, 2000, 02:16 AM
How can I check my Hotmail, or regular POP3 mail, if I have got any new ?
Please, really need help with this.
privoli
Apr 11th, 2000, 01:54 PM
A sample winsock application. Connects to a mail server and checks your email...
Create a new form...
Add a text box caled "Text1"
Add a command button called "Command1"
Add a winsock control called "Winsock1"
Set Text1 to MultiLine = True and ScrollBars = Both
Paste the following code and run....
Private Sub Command1_Clik()
'connect to server
Winsock1.connect "mail.yourisp.com", 110
End Sub
Private Sub Winsock1_Connect()
'send http request (ask for the file)
Winsock1.senddata "user " & UsernameTxt.Text & vbcrlf
DoEvents
Winsock1.senddata "pass " & PasswordTxt.Text & vbcrlf
DoEvents
Winsock1.SendData "stat" & vbcrlf
DoEvents
End Sub
Private Sub Winsock1_DataArrival(bytes as long)
'weve recieved a packet, keep track of it and add it to the text box
Winsock1.getdata TempStr, vbString
text1.text = text1.text & TempStr
End Sub
Private Sub Winsock1_Close()
'its complete, the httpd server automatically closes the connection
'when the file get is complete :)
End Sub
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.