How to manage mailboxes on IMAP server

procedure TForm1.btnCreateDelClick(Sender: TObject);   
begin   
   clIMAP4.Server := 'mail.test.com';   
   clIMAP4.UserName := 'test';   
   clIMAP4.Password := 'test';   
   clIMAP4.UseTLS := ctNone;   
   clIMAP4.UseSPA := False;   
   clIMAP4.Open();   
 
   clIMAP4.CreateMailBox('MyMailbox');   
   clIMAP4.SelectMailBox('MyMailbox');   
   clIMAP4.DeleteMailBox('MyMailbox');   
 
   clIMAP4.Close();   
end; 

Add Feedback