Search The ForumSearch   RegisterRegister  LoginLogin

MailBee POP3

 AfterLogic Forum : MailBee POP3
Subject Topic: search() method Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
simone
Guest Group
Guest Group


Joined: 10 November 2003
Online Status: Online
Posts: 262
Posted: 21 August 2005 at 10:55pm | IP Logged Quote simone

Hello,

Can you please provide an example of using the search method to retrieve the UID's in C#.NET? In particular the casting of the system.object[] back to its original type (presumably a long?)

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

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 22 August 2005 at 11:14am | IP Logged Quote Alex

Unlike IMAP UIDs, POP3 UIDs are strings. So, to iterate through POP3 UIDs, you can use the code like the following:
Code:

MailBee.POP3Class pop3 = new MailBee.POP3Class();
pop3.LicenseKey = "your trial or permanent key";
pop3.Connect("pop.server.com", 110, "user", "pass");
Array uids = (Array)pop3.Search();
foreach (object uid in uids)
{
  Console.WriteLine((string)uid);
}
pop3.Disconnect();
pop3 = null;


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


Joined: 10 November 2003
Online Status: Online
Posts: 262
Posted: 22 August 2005 at 7:35pm | IP Logged Quote Simone

Hi Alex,

Thanks, it works just fine using the above code.

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

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