Sends command which expects to receive multi-line response e.g. "EHLO".

Namespace: Lesnikowski.Client
Assembly: Mail (in Mail.dll) Version: 3.0.1213.909

Syntax

C#
public SmtpResponse SendCommand(
	string command,
	bool throwException
)
Visual Basic
Public Function SendCommand ( _
	command As String, _
	throwException As Boolean _
) As SmtpResponse
Visual C++
public:
SmtpResponse^ SendCommand(
	String^ command, 
	bool throwException
)

Parameters

command
Type: System..::..String
Command to send e.g. "EHLO".
throwException
Type: System..::..Boolean
If true throws ServerException on error response

Return Value

Server's response.

Remarks

Most commands have their own specialized methods in this class, you should probably use them instead.

Exceptions

ExceptionCondition
Lesnikowski.Client..::..ServerException Throws ServerException on error response (if 'throwException' is set to true).

See Also