Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET IMAP

 AfterLogic Forum : MailBee.NET IMAP
Subject Topic: Purge Messages Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Naresh
Newbie
Newbie


Joined: 12 April 2007
Location: India
Online Status: Offline
Posts: 9
Posted: 08 August 2007 at 1:21am | IP Logged Quote Naresh

Hi,

We need to provision our system to automatically purge messages older then X days. Please let us know how this could be done programmatically interfacing with the server.

Regards,
Naresh
Back to Top View Naresh's Profile Search for other posts by Naresh
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 08 August 2007 at 1:57am | IP Logged Quote Andrew

You should connect to the IMAP server, then use Imap.Search method with BEFORE <date> condition to get UIDs of all messages which older than specified date. Then, use Imap.DeleteMessages method to delete all messages which correspond the found UIDs.

Please don't forget to call Imap.Expunge method to permanently delete messages which were marked as deleted during the operations described above.


Best regards,
Andrew
Back to Top View Andrew's Profile Search for other posts by Andrew
 

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