Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET IMAP

 AfterLogic Forum : MailBee.NET IMAP
Subject Topic: Delete message IMAP Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
loredano
Newbie
Newbie
Avatar

Joined: 11 April 2018
Location: Italy
Online Status: Offline
Posts: 15
Posted: 04 October 2019 at 1:05am | IP Logged Quote loredano

Hi,
are there some difference between use the method

public bool DeleteMessages(
     string messageIndexSet,
     bool indexIsUid
)

and/or

public bool SetMessageFlags(
     string messageIndexSet,
     bool indexIsUid,
     SystemMessageFlags systemFlags,
     MessageFlagAction action
)

before to call "Imap.Expunge Method" to permanently delete messages on imap server?

This question because we note sometimes, with a large number of messages to delete, the messages are not deletes with not exceptions.
In our code we use:
imp.DeleteMessages(toDelete, true);
imp.Expunge(toDelete, false)
to delete the "toDelete" messages.


Regards,
Loredano

Back to Top View loredano's Profile Search for other posts by loredano
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2145
Posted: 04 October 2019 at 1:36am | IP Logged Quote Alex

Hi,

You may try using imp.Expunge() without parameters if you want to delete all messages with \Deleted flag, not only certain ones.

Anyway, the first troubleshooting measure is enabling log file (imp.Log). The log way show may actually happens there. Maybe, some issue with the mail server. Deleting lots of messages at once can be too heavy operation for that server and you may need to refactor the code to delete and expunge messages in smaller portions.

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide