Επεξεργασία

Κοινή χρήση μέσω


SmtpFailedRecipientException Constructors

Definition

Initializes a new instance of the SmtpFailedRecipientException class.

Overloads

SmtpFailedRecipientException()

Initializes an empty instance of the SmtpFailedRecipientException class.

SmtpFailedRecipientException(String)

Initializes a new instance of the SmtpFailedRecipientException class with the specified error message.

SmtpFailedRecipientException(SmtpStatusCode, String)

Initializes a new instance of the SmtpFailedRecipientException class with the specified status code and email address.

SmtpFailedRecipientException(SerializationInfo, StreamingContext)
Obsolete.

Initializes a new instance of the SmtpFailedRecipientException class from the specified instances of the SerializationInfo and StreamingContext classes.

SmtpFailedRecipientException(String, Exception)

Initializes a new instance of the SmtpException class with the specified error message and inner exception.

SmtpFailedRecipientException(SmtpStatusCode, String, String)

Initializes a new instance of the SmtpFailedRecipientException class with the specified status code, email address, and server response.

SmtpFailedRecipientException(String, String, Exception)

Initializes a new instance of the SmtpException class with the specified error message, email address, and inner exception.

SmtpFailedRecipientException()

Source:
SmtpFailedRecipientException.cs
Source:
SmtpFailedRecipientException.cs
Source:
SmtpFailedRecipientException.cs

Initializes an empty instance of the SmtpFailedRecipientException class.

public:
 SmtpFailedRecipientException();
public SmtpFailedRecipientException ();
Public Sub New ()

Applies to

SmtpFailedRecipientException(String)

Source:
SmtpFailedRecipientException.cs
Source:
SmtpFailedRecipientException.cs
Source:
SmtpFailedRecipientException.cs

Initializes a new instance of the SmtpFailedRecipientException class with the specified error message.

public:
 SmtpFailedRecipientException(System::String ^ message);
public SmtpFailedRecipientException (string? message);
public SmtpFailedRecipientException (string message);
new System.Net.Mail.SmtpFailedRecipientException : string -> System.Net.Mail.SmtpFailedRecipientException
Public Sub New (message As String)

Parameters

message
String

A String that contains the error message.

Remarks

This constructor uses the message parameter to initialize the Message property.

Applies to

SmtpFailedRecipientException(SmtpStatusCode, String)

Source:
SmtpFailedRecipientException.cs
Source:
SmtpFailedRecipientException.cs
Source:
SmtpFailedRecipientException.cs

Initializes a new instance of the SmtpFailedRecipientException class with the specified status code and email address.

public:
 SmtpFailedRecipientException(System::Net::Mail::SmtpStatusCode statusCode, System::String ^ failedRecipient);
public SmtpFailedRecipientException (System.Net.Mail.SmtpStatusCode statusCode, string? failedRecipient);
public SmtpFailedRecipientException (System.Net.Mail.SmtpStatusCode statusCode, string failedRecipient);
new System.Net.Mail.SmtpFailedRecipientException : System.Net.Mail.SmtpStatusCode * string -> System.Net.Mail.SmtpFailedRecipientException
Public Sub New (statusCode As SmtpStatusCode, failedRecipient As String)

Parameters

statusCode
SmtpStatusCode

An SmtpStatusCode value.

failedRecipient
String

A String that contains the email address.

Remarks

This constructor uses the statusCode parameter to initialize the StatusCode property and uses the failedRecipient parameter to initialize the FailedRecipient property.

Applies to

SmtpFailedRecipientException(SerializationInfo, StreamingContext)

Source:
SmtpFailedRecipientException.cs
Source:
SmtpFailedRecipientException.cs
Source:
SmtpFailedRecipientException.cs

Caution

This API supports obsolete formatter-based serialization. It should not be called or extended by application code.

Initializes a new instance of the SmtpFailedRecipientException class from the specified instances of the SerializationInfo and StreamingContext classes.

protected:
 SmtpFailedRecipientException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected SmtpFailedRecipientException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
[System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
protected SmtpFailedRecipientException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.Net.Mail.SmtpFailedRecipientException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Net.Mail.SmtpFailedRecipientException
[<System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Net.Mail.SmtpFailedRecipientException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Net.Mail.SmtpFailedRecipientException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

Parameters

info
SerializationInfo

A SerializationInfo that contains the information required to serialize the new SmtpFailedRecipientException.

context
StreamingContext

A StreamingContext that contains the source and destination of the serialized stream that is associated with the new instance.

Attributes

Remarks

This constructor implements the ISerializable interface for the SmtpFailedRecipientException class.

Applies to

SmtpFailedRecipientException(String, Exception)

Source:
SmtpFailedRecipientException.cs
Source:
SmtpFailedRecipientException.cs
Source:
SmtpFailedRecipientException.cs

Initializes a new instance of the SmtpException class with the specified error message and inner exception.

public:
 SmtpFailedRecipientException(System::String ^ message, Exception ^ innerException);
public SmtpFailedRecipientException (string? message, Exception? innerException);
public SmtpFailedRecipientException (string message, Exception innerException);
new System.Net.Mail.SmtpFailedRecipientException : string * Exception -> System.Net.Mail.SmtpFailedRecipientException
Public Sub New (message As String, innerException As Exception)

Parameters

message
String

A String that describes the error that occurred.

innerException
Exception

The exception that is the cause of the current exception.

Applies to

SmtpFailedRecipientException(SmtpStatusCode, String, String)

Source:
SmtpFailedRecipientException.cs
Source:
SmtpFailedRecipientException.cs
Source:
SmtpFailedRecipientException.cs

Initializes a new instance of the SmtpFailedRecipientException class with the specified status code, email address, and server response.

public:
 SmtpFailedRecipientException(System::Net::Mail::SmtpStatusCode statusCode, System::String ^ failedRecipient, System::String ^ serverResponse);
public SmtpFailedRecipientException (System.Net.Mail.SmtpStatusCode statusCode, string? failedRecipient, string? serverResponse);
public SmtpFailedRecipientException (System.Net.Mail.SmtpStatusCode statusCode, string failedRecipient, string serverResponse);
new System.Net.Mail.SmtpFailedRecipientException : System.Net.Mail.SmtpStatusCode * string * string -> System.Net.Mail.SmtpFailedRecipientException
Public Sub New (statusCode As SmtpStatusCode, failedRecipient As String, serverResponse As String)

Parameters

statusCode
SmtpStatusCode

An SmtpStatusCode value.

failedRecipient
String

A String that contains the email address.

serverResponse
String

A String that contains the server response.

Remarks

This constructor uses the statusCode parameter to initialize the StatusCode property and uses the failedRecipient parameter to initialize the FailedRecipient property.

Applies to

SmtpFailedRecipientException(String, String, Exception)

Source:
SmtpFailedRecipientException.cs
Source:
SmtpFailedRecipientException.cs
Source:
SmtpFailedRecipientException.cs

Initializes a new instance of the SmtpException class with the specified error message, email address, and inner exception.

public:
 SmtpFailedRecipientException(System::String ^ message, System::String ^ failedRecipient, Exception ^ innerException);
public SmtpFailedRecipientException (string? message, string? failedRecipient, Exception? innerException);
public SmtpFailedRecipientException (string message, string failedRecipient, Exception innerException);
new System.Net.Mail.SmtpFailedRecipientException : string * string * Exception -> System.Net.Mail.SmtpFailedRecipientException
Public Sub New (message As String, failedRecipient As String, innerException As Exception)

Parameters

message
String

A String that describes the error that occurred.

failedRecipient
String

A String that contains the email address.

innerException
Exception

The exception that is the cause of the current exception.

Applies to