ممنون میشم اگر مدیران تاپیک منو در قسمت درست (قسمت شبکه دلفی) قرار بدن
اینم کدی که نوشتم
Memo1.Clear;
POP3.ConnectTimeout := 20000;
if POP3.Connected then
POP3.Disconnect;
POP3.Host := '*****';
POP3.Port := 995;
POP3.Username := '*****';
POP3.Password := '*****';
SSLIOHandler.Host := POP3.Host;
SSLIOHandler.Port := POP3.Port;
POP3.IOHandler := SSLIOHandler;
POP3.UseTLS := utUseImplicitTLS
try
POP3.Connect;
except
Memo1.Text := Memo1.Text + 'Can not connect to server' + #13#10;
Memo1.Text := Memo1.Text + '==========' + #13#10;
end;
for i := 1 to POP3.CheckMessages do
begin
Msg.Clear;
POP3.RetrieveHeader(i, Msg)
Memo1.Text := Memo1.Text + 'Subject: ' + Msg.Subject + #13#10;
Memo1.Text := Memo1.Text + 'AttachmentCount: ' + IntToStr(Msg.MessageParts.AttachmentCount) + #13#10;
Memo1.Text := Memo1.Text + 'MessagePartsCount: ' + IntToStr(Msg.MessageParts.Count) + #13#10;
Memo1.Text := Memo1.Text + '==========' + #13#10;
end;
POP3.Disconnect;
Memo1.Text := Memo1.Text + 'End of conecction' + #13#10;