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




Gets the textual response without the 3-digit response code and CR/LF's.

Syntax

Visual Basic (Declaration) 
Public ReadOnly Property Text As String
Visual Basic (Usage)Copy Code
Dim instance As Response
Dim value As String
 
value = instance.Text
C# 
public string Text {get;}
Managed Extensions for C++ 
public: __property string* get_Text();
C++/CLI 
public:
property String^ Text {
   String^ get();
}

Property Value

A string representing the test response parsed from the raw response.

Example

The following example demonstrates using Invoke to send a custom command.
Visual BasicCopy Code
' Set server and user properties. This will allow us to call other
' Ftp Component methods with the log in taking place "behind the scenes"
Ftp1.Server = "MyFTPServer"
Ftp1.Username = "blah"
Ftp1.Password = "mypass"

' Invoke a command
Dim invoke as Dart.PowerTCP.Ftp.Invoke

' Use Invoke(FtpCommand.Null) to send a proprietary command

Try
   invoke = Ftp1.Invoke(Dart.PowerTCP.Ftp.FtpCommand.Null, "MYFILECOMMAND file1.txt")
Catch ex As Exception
   Debug.WriteLine("Error: " + ex.Message)
   Exit Sub
End Try
            
' Success. Print response.
Debug.WriteLine("Response from server : " + invoke.Response.Text)
Ftp1.Close()
C#Copy Code
// Set server and user properties. This will allow us to call other
// Ftp Component methods with the log in taking place "behind the scenes"
ftp1.Server = "MyFTPServer";
ftp1.Username = "blah";
ftp1.Password = "mypass";

// Use Invoke(FtpCommand.Null) to send a proprietary command
try
{
   Dart.PowerTCP.Ftp.Invoke invoke = ftp1.Invoke(Dart.PowerTCP.Ftp.FtpCommand.Null, "MYFILECOMMAND file1.txt");
}
catch(Exception ex)
{
   Debug.WriteLine("Error: " + ex.Message);
   return;
}
    
// Success. Print response
Debug.WriteLine("Response from server : " + invoke.Response.Text);

// Close connection
ftp1.Close();

Remarks

The Response.Text property allows easy access to the text (the response from the server minus the response code and CRLFs) parsed from the raw response. To retrieve the raw response, simply use the Response.ToString method.

This property is useful because it allows access to the response string from the server without having to parse.

If the response from the server was "200 Working Directory Changed", this property would contain "Working Directory Changed".

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

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