Deleting a message from the POP3 server

procedure TForm1.btnDeleteClick(Sender: TObject);   
var   
   msgNo: Integer;   
begin   
   if clPOP3.Active then Exit;   
 
   clPOP3.Server := 'mail.test.com';   
   clPOP3.Password := 'test';   
   clPOP3.UserName := 'test';   
   clPOP3.UseSasl := False;   
   clPOP3.Open();   
 
   msgNo := 1;   
   clPOP3.Delete(msgNo);   
 
   clPOP3.Close();   
end;

Add Feedback