ok.non mancherò
ciao
rincollo codice con tag
codice:
Private Sub Winsock_DataArrival(ByVal bytesTotal As Long)
'assegno alla variabile pubblica in function il valore della risposta del server
Winsock.GetData functions.RespSRV
'Verifico se nella risposta esiste il +OK o no
'Nel protocollo pop3 ogni risposta positiva vede come inizio la sigla "+OK"
If Winsock.Tag = "RETR" Then
Put #1, , functions.RespSRV
'Essendo il tag del winsock settato a RETR, significa che sto ricevendo una mail
'quindi devo attendere che sia presente nella stringa il valore: vbcrlf.vbcrlf
'per sapere che la mail è arrivata al termine
If InStr(functions.RespSRV, vbCrLf & "." & vbCrLf) Then
'STringa presente, quindi la mail è terminata
Close 1
msgMail.Text = msgMail.Text & "-------------------------STOP(" & a & ")--------------------" & vbCrLf
endmail = True
Else
'Stringa non presente, quindi sto ancora ricevendo la mail
'functions.RespSRVTemp = functions.RespSRVTemp & functions.RespSRV
endmail = False
End If
Else
If Left(functions.RespSRV, 3) = "+OK" Then
srvmsg.Text = srvmsg.Text & functions.RespSRV & vbCrLf
Else
srvmsgerr.Text = srvmsgerr.Text & functions.RespSRV & vbCrLf
End If
End If
End Sub