| Author |  | 
      
        | wbMHK Newbie
 
  
 
 Joined: 03 September 2012
 Location: Denmark
 Online Status: Offline
 Posts: 2
 | 
          Hi
           | Posted: 03 September 2012 at 2:57am | IP Logged |   |  
           | 
 |  
 When using
 Imap imp = new Imap....
 imp.DeleteMessages(ids, false);
 imp.Expunge();
 
 It deletes the mails from the server, and not moving them down to the Deleted Mails folder. Is this a error or?
 
 If it supposed to delete the mails from the server, how do I so, so the mails is moving down to the Deleted Mails folder?
 
 I know I can do something like
 imp.MoveMessages(ids, false, "Deleted Mails");
 The problem is, that I dont have a "Deleted Mails", because my system is running on another language. So if it should works for me, I should use this instead
 imp.MoveMessages(ids, false, "Slettet Post"); //'Slettet Post' is danish and is the Deleted mails folder.
 
 //Morten
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Igor AfterLogic Support
 
  
 
 Joined: 24 June 2008
 Location: United States
 Online Status: Offline
 Posts: 6167
 | 
          The purpose of DeleteMessages method is to delete messages from server permanently. While some mail servers might move mails to Trash instead, it's absolutely not a generic behavior. So yes, you will need to use MoveMessages method instead.
           | Posted: 03 September 2012 at 3:01am | IP Logged |   |  
           | 
 |  
 --
 Regards,
 Igor, AfterLogic Support
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | wbMHK Newbie
 
  
 
 Joined: 03 September 2012
 Location: Denmark
 Online Status: Offline
 Posts: 2
 | 
          And there is no way I can detect which folder is the trash folder from the DownloadFolders?
           | Posted: 03 September 2012 at 3:27am | IP Logged |   |  
           | 
 |  | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Igor AfterLogic Support
 
  
 
 Joined: 24 June 2008
 Location: United States
 Online Status: Offline
 Posts: 6167
 | 
          It can be done if the particular server supports XLIST extension. For more details, please see documentation on DownloadFolders method and UseXList property.
           | Posted: 03 September 2012 at 3:34am | IP Logged |   |  
           | 
 |  
 --
 Regards,
 Igor, AfterLogic Support
 | 
       
        | Back to Top |     | 
       
       
        |  |