I have a for loop which loops through and sends an email each loop. Right now im using thread.sleep() but I want the user to still be able to interact with the program, just del
You need to put the method of sending mail in separated thread to keep your GUI interactive .
Thread newThread = new Thread(new ThreadStart(SendMail)); newThread.Start(); public void SendMail() { //Send mails here }