Dim BufferA As String
Private Sub Command1_Click()
'Òóò óêàçàòü ïàðîëü!!! è ëîãèí äëÿ êîííåêòà ê ñåðâåðó
Connecting "(Тут POP3-Сервер)", "esemenov", "****"
MessageSingIn
End Sub
Private Sub Command2_Click()
pop.Close
End Sub
Private Sub Form_Terminate()
pop.Close
End Sub
Sub Connecting(pop3server As String, username As String, password As String)
pop.Close
pop.RemoteHost = pop3server
pop.RemotePort = 110
List1.Clear
List1.AddItem "CONNECT"
List1.AddItem "USER " & "esemenov"
List1.AddItem "PASS " & ****
List1.AddItem "STAT"
List1.AddItem "QUIT"
Timer1.Enabled = True
End Sub
Private Sub Form_Unload(Cancel As Integer)
pop.Close
End Sub
Private Sub pop_DataArrival(ByVal bytesTotal As Long)
Dim DataPul() As String
Dim AAA As String
pop.GetData AAA
BufferA = BufferA & AAA
If Right(BufferA, 2) <> vbCrLf Then Exit Sub
Text1 = Text1 & AAA
Select Case UCase(lstcmd)
Case "QUIT"
pop.Close
Case Else
Timer1.Enabled = True
End Select
BufferA = ""
End Sub
Private Sub Timer1_Timer()
Caption = pop.State
If List1.ListCount > 0 Then
lstcmd = List1.List(0)
List1.RemoveItem 0
Select Case UCase(lstcmd)
Case "CONNECT"
BufferA = ""
pop.Close
pop.Connect
Case Else
pop.SendData lstcmd & vbCrLf
End Select
End If
Timer1.Enabled = False
End Sub
Сейчас этот форум просматривают: Yandex-бот и гости: 170