Class SmtpServerReply
Represents an SMTP server response object.
Inherited Members
Namespace: Swan.Net.Smtp
Syntax
public class SmtpServerReply
Constructors
SmtpServerReply()
Initializes a new instance of the SmtpServerReply class.
Declaration
public SmtpServerReply()
SmtpServerReply(Int32, String)
Initializes a new instance of the SmtpServerReply class.
Declaration
public SmtpServerReply(int responseCode, string content)
Parameters
Type | Name | Description |
---|---|---|
Int32 | responseCode | The response code. |
String | content | The content. |
SmtpServerReply(Int32, String, String)
Initializes a new instance of the SmtpServerReply class.
Declaration
public SmtpServerReply(int responseCode, string statusCode, string content)
Parameters
Type | Name | Description |
---|---|---|
Int32 | responseCode | The response code. |
String | statusCode | The status code. |
String | content | The content. |
SmtpServerReply(Int32, String, String[])
Initializes a new instance of the SmtpServerReply class.
Declaration
public SmtpServerReply(int responseCode, string statusCode, params string[] content)
Parameters
Type | Name | Description |
---|---|---|
Int32 | responseCode | The response code. |
String | statusCode | The status code. |
String[] | content | The content. |
Properties
AuthorizationRequired
Gets the authorization required reply.
Declaration
public static SmtpServerReply AuthorizationRequired { get; }
Property Value
Type | Description |
---|---|
SmtpServerReply |
BadSequenceOfCommands
Gets the bad sequence of commands reply.
Declaration
public static SmtpServerReply BadSequenceOfCommands { get; }
Property Value
Type | Description |
---|---|
SmtpServerReply |
BadSyntaxCommandEmpty
Gets the bad syntax command empty reply.
Declaration
public static SmtpServerReply BadSyntaxCommandEmpty { get; }
Property Value
Type | Description |
---|---|
SmtpServerReply |
CommandNotImplemented
Gets the command not implemented reply.
Declaration
public static SmtpServerReply CommandNotImplemented { get; }
Property Value
Type | Description |
---|---|
SmtpServerReply |
CommandUnrecognized
Gets the command unrecognized reply.
Declaration
public static SmtpServerReply CommandUnrecognized { get; }
Property Value
Type | Description |
---|---|
SmtpServerReply |
Content
Gets the content.
Declaration
public List<string> Content { get; }
Property Value
Type | Description |
---|---|
List<String> |
EnhancedStatusCode
Gets the enhanced status code.
Declaration
public string EnhancedStatusCode { get; }
Property Value
Type | Description |
---|---|
String |
IsPositive
Gets a value indicating whether this instance is positive.
Declaration
public bool IsPositive { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsValid
Returns true if the response code is between 200 and 599.
Declaration
public bool IsValid { get; }
Property Value
Type | Description |
---|---|
Boolean |
Ok
Gets the OK reply.
Declaration
public static SmtpServerReply Ok { get; }
Property Value
Type | Description |
---|---|
SmtpServerReply |
ProtocolViolation
Gets the protocol violation reply.
Declaration
public static SmtpServerReply ProtocolViolation { get; }
Property Value
Type | Description |
---|---|
SmtpServerReply |
ReplyCode
Gets the numeric response code.
Declaration
public int ReplyCode { get; }
Property Value
Type | Description |
---|---|
Int32 |
ReplyCodeCategory
Gets the response category.
Declaration
public SmtpReplyCodeCategories ReplyCodeCategory { get; }
Property Value
Type | Description |
---|---|
SmtpReplyCodeCategories |
ReplyCodeSeverity
Gets the response severity.
Declaration
public SmtpReplyCodeSeverities ReplyCodeSeverity { get; }
Property Value
Type | Description |
---|---|
SmtpReplyCodeSeverities |
SyntaxErrorArguments
Gets the syntax error arguments reply.
Declaration
public static SmtpServerReply SyntaxErrorArguments { get; }
Property Value
Type | Description |
---|---|
SmtpServerReply |
SystemStatusBye
Gets the system status bye reply.
Declaration
public static SmtpServerReply SystemStatusBye { get; }
Property Value
Type | Description |
---|---|
SmtpServerReply |
SystemStatusHelp
Gets the system status help reply.
Declaration
public static SmtpServerReply SystemStatusHelp { get; }
Property Value
Type | Description |
---|---|
SmtpServerReply |
Methods
Parse(String)
Parses the specified text into a Server Reply for thorough analysis.
Declaration
public static SmtpServerReply Parse(string text)
Parameters
Type | Name | Description |
---|---|---|
String | text | The text. |
Returns
Type | Description |
---|---|
SmtpServerReply | A new instance of SMTP server response object. |
ToString()
Returns a String that represents this instance.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | A String that represents this instance. |