Returns the internal date, flags, and size of the message.
For a list of all members of this type, see FastItem Members.
System.Object
FastItem
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
The FastItem is a quick an efficient way of obtaining some basic information about a message. In a single IMAP command, all of this information can be determined for a single message. It is the equivalent of querying the message for three different pieces of information, in a single command.
[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();
//get the information about the first message
FastItem item = mf.FetchClient.Fast( 1, IndexType.Ordinal );
imap.Disconnect();
//write out some informtion about the message
//size
Console.WriteLine( "Message size: {0}", item.MessageSize );
//message date as a string
Console.WriteLine( "String date: {0}", item.InternalDate);
//message date as a .NET DateTime
Console.WriteLine( "DateTime: {0}", item.Date.ToLongDateString() );
//message flags
Console.WriteLine( "Flags: {0}", item.Flags.ToString() );
//the complete layout of the FastItem
Console.WriteLine( item.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()
'get the information about the first message
Dim item As FastItem = mf.FetchClient.Fast(1, IndexType.Ordinal)
imap.Disconnect()
'write out some informtion about the message
'size
Console.WriteLine("Message size: {0}", item.MessageSize)
'message date as a string
Console.WriteLine("String date: {0}", item.InternalDate)
'message date as a .NET DateTime
Console.WriteLine("DateTime: {0}", item.Date.ToLongDateString())
'message flags
Console.WriteLine("Flags: {0}", item.Flags.ToString())
'the complete layout of the FastItem
Console.WriteLine(item.ToString())
Console.WriteLine("Done")
Console.ReadLine()
Namespace: aspNetIMAP
Assembly: aspNetIMAP (in aspNetIMAP.dll)