A folder's information class.
For a list of all members of this type, see FolderInformation Members.
System.Object
FolderInformation
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
This class provides various folder information in a single network call. This object is usually populated by calling MailFolder.Information()
[C#]
IMAP4 imap = new IMAP4( "127.0.0.1" );
imap.Username = "dave@blah.com";
imap.Password = "test";
imap.Login();
//grab the inbox
MailFolder mf = imap.SelectInbox();
FolderInformation fi = mf.Information();
imap.Disconnect();
//write out the folder information
Console.WriteLine( "First unseen message:{0}", fi.FirstUnseen );
Console.WriteLine( "Number of messages in folder:{0}", fi.Messages );
Console.WriteLine( "Folder name:{0}", fi.Name );
Console.WriteLine( "Folder path:{0}", fi.Path );
Console.WriteLine( "Number of recent messages (have the 'recent' flag set):{0}", fi.Recent );
Console.WriteLine( "The UID that will be assigned to the next message:{0}", fi.UidNext );
Console.WriteLine( "The unique validity for the mailbox:{0}", fi.UidVAlidity );
//All FolderInformation, nicely formatted
Console.WriteLine( fi.ToString() );
Console.WriteLine( "Done" );
Console.ReadLine();
[VB.NET]
Dim imap As New IMAP4("127.0.0.1")
imap.Username = "dave@blah.com"
imap.Password = "test"
imap.Login()
'grab the inbox
Dim mf As MailFolder = imap.SelectInbox()
Dim fi As FolderInformation = mf.Information()
imap.Disconnect()
'write out the folder information
Console.WriteLine("First unseen message:{0}", fi.FirstUnseen)
Console.WriteLine("Number of messages in folder:{0}", fi.Messages)
Console.WriteLine("Folder name:{0}", fi.Name)
Console.WriteLine("Folder path:{0}", fi.Path)
Console.WriteLine("Number of recent messages (have the 'recent' flag set):{0}", fi.Recent)
Console.WriteLine("The UID that will be assigned to the next message:{0}", fi.UidNext)
Console.WriteLine("The unique validity for the mailbox:{0}", fi.UidVAlidity)
'All FolderInformation, nicely formatted
Console.WriteLine(fi.ToString())
Console.WriteLine("Done")
Console.ReadLine()
Namespace: aspNetIMAP
Assembly: aspNetIMAP (in aspNetIMAP.dll)