Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET IMAP

 AfterLogic Forum : MailBee.NET IMAP
Subject Topic: UIds from deleted messages Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
jvinis
Newbie
Newbie


Joined: 20 May 2008
Online Status: Offline
Posts: 18
Posted: 21 May 2008 at 7:39am | IP Logged Quote jvinis

How can i retrieve uids from deleted messages for the last 5 days from gmail account?

thanks
Back to Top View jvinis's Profile Search for other posts by jvinis
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 22 May 2008 at 1:36am | IP Logged Quote Andrew

You should select Trash folder via Imap.SelectFolder method, then search for UIDs via Imap.Search method with SINCE search clause (current date minus 5 days).

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

Joined: 19 May 2009
Location: India
Online Status: Offline
Posts: 7
Posted: 28 July 2009 at 4:26am | IP Logged Quote chintan

Above Method seems to be not working as of now.(July-2009)

I have tried imp.SelectFolder("Trash") and imp.SelectFolder("Spam") both method but it returns following message

"The server has responded with negative reply. The server responded: MBN00000003 NO Unknown Mailbox: Trash (Failure)."

Any idea why its not working ?

also DELETED flag doesn't work
uids = CType(imp.Search(True, "DELETED", Nothing), UidCollection)

Please reply ASAP.
Back to Top View chintan's Profile Search for other posts by chintan
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 28 July 2009 at 5:05am | IP Logged Quote Igor

Quote:
Above Method seems to be not working as of now.(July-2009)


Are you trying to use this method on GMail account?

We have used the following code:
Code:
using MailBee;
using MailBee.ImapMail;
using MailBee.Security;

...
Imap.LicenseKey = "trial or permanent license key";
Imap imp = new Imap();
imp.SslMode = SslStartupMode.OnConnect;
imp.Connect("imap.gmail.com", 993);
imp.Login("username", "password");
FolderCollection folders = imp.DownloadFolders();
foreach (Folder imapFolder in folders)
{
    Console.WriteLine(imapFolder.Name);
}
imp.SelectFolder("Trash");
Console.WriteLine("TRASH: " + imp.MessageCount);
imp.SelectFolder(@"[Gmail]/Spam");
Console.WriteLine("SPAM: " + imp.MessageCount);
imp.Disconnect();
Console.ReadLine();


The code lists all the IMAP folders available on the account and then displays number of messages in Trash and Spam folders. As you can see, there is no folder called "Spam", you should refer to it using "[Gmail]/Spam" folder name. With regard to Trash, either "Trash" or "[Gmail]/Trash" folder name can be used.

If you're using mail server other than GMail, you should make sure those folder exists.

With regard to Deleted flags, it doesn't mean messages placed to Trash. Instead, it means messages marked as deleted. Check this documentation page for details on this.

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

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