PowerTCP Mail for .NET
Explanation Property
See Also  Send comments on this topic.
Dart.PowerTCP.Mail Namespace > ImapResponse Class : Explanation Property




Gets any explanation text returned by the server.

Syntax

Visual Basic (Declaration) 
Public Property Explanation As String
Visual Basic (Usage)Copy Code
Dim instance As ImapResponse
Dim value As String
 
instance.Explanation = value
 
value = instance.Explanation
C# 
public string Explanation {get; set;}
Managed Extensions for C++ 
public: __property string* get_Explanation();
public: __property void set_Explanation( 
   string* value
);
C++/CLI 
public:
property String^ Explanation {
   String^ get();
   void set (    String^ value);
}

Property Value

If an explanation was included with the response, this property will contain the string representation of that explanation. If no explanation was included with the response, this property will contain an empty string.

Example

The following example demonstrates using the LineReceived event to detect Status responses.
Visual BasicCopy Code
Private Sub DoSomething()
   ' Log in. The Imap.LineReceived event will be raised when data is received
   Imap1.Login(Server, User, Pass)

   ' Send a NOOP
   Imap1.Noop()

   ' Log out
   Imap1.Logout()
End Sub

Private Sub Imap1_LineReceived(ByVal sender As Object, ByVal e As Dart.PowerTCP.Mail.ImapResponseEventArgs) Handles Imap1.LineReceived
   Dim Response As ImapResponse
   ' Iterate through all responses.
   For Each Response In e.Responses
      ' Check if it is a status response. 
      If Response.ResponseType = ImapResponseType.Status Then 
         Debug.WriteLine("The server has returned a status response")
         Debug.WriteLine("Status: " + Response.Status)
         Debug.WriteLine("Explanation: " + Response.Explanation)
      End If
   Next
End Sub
C#Copy Code
private void DoSomething()
{
   // Log in. The Imap.LineReceived event will be raised when data is received
   imap1.Login(Server, User, Pass);

   // Send a NOOP
   imap1.Noop();

   // Log out
   imap1.Logout();
}

private void imap1_LineReceived(object sender, Dart.PowerTCP.Mail.ImapResponseEventArgs e)
{
   // Iterate through all responses.
   foreach(ImapResponse response in e.Responses)
   {
      // Check if it is a status response.
      if(response.ResponseType == ImapResponseType.Status)
      {
         Debug.WriteLine("The server has returned a status response");
         Debug.WriteLine("Status: " + response.Status);
         Debug.WriteLine("Explanation: " + response.Explanation);
      }
   }
}

Remarks

This property returns any text sent by the server as additional explanatory information. For example, if the following line was received from the IMAP server,

* OK [UIDVALIDITY 1032904889] UIDs valid

the ImapResponse.Explanation property would contain "UIDs valid". This information is not included with all responses from the server.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

Documentation Version 3.2
© 2010 Dart Communications. All Rights Reserved.