| Author |  | 
      
        | RBuckley Newbie
 
  
 
 Joined: 04 March 2014
 Location: United States
 Online Status: Offline
 Posts: 4
 | 
          I am in a MailMessageCollection For-Next loop.  How can I delete the message after I process it?
           | Posted: 04 March 2014 at 3:56pm | IP Logged |   |  
           | 
 |  | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Igor AfterLogic Support
 
  
 
 Joined: 24 June 2008
 Location: United States
 Online Status: Offline
 Posts: 6167
 | 
          To delete message from IMAP, you need to know its UID. Assuming you have downloaded mail message or collection of those from IMAP, MailMessage.UidOnServer property will hold the value you require for calling Imap.DeleteMessages method.
           | Posted: 05 March 2014 at 2:25am | IP Logged |   |  
           | 
 |  
 --
 Regards,
 Igor, AfterLogic Support
 
 PS. The thread is moved to MailBee.NET Objects section.
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | RBuckley Newbie
 
  
 
 Joined: 04 March 2014
 Location: United States
 Online Status: Offline
 Posts: 4
 | 
          Thank you!
           | Posted: 05 March 2014 at 3:23am | IP Logged |   |  
           | 
 |  | 
       
        | Back to Top |     | 
       
       
        |  |