Class SmtpDeliveryResult
The result of a single Send(MimeMessage) operation. Immutable.
Inherited Members
Namespace: DRIT.Mail.Rfc.Smtp
Assembly: DRIT.Mail.dll
Syntax
public sealed class SmtpDeliveryResult
Constructors
View SourceSmtpDeliveryResult(bool, SmtpResponse?, IReadOnlyList<SmtpRecipientResult>, Exception?)
Initializes a new instance of the SmtpDeliveryResult class.
Declaration
public SmtpDeliveryResult(bool success, SmtpResponse? response, IReadOnlyList<SmtpRecipientResult> recipients, Exception? error)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | success | |
| SmtpResponse | response | |
| IReadOnlyList<SmtpRecipientResult> | recipients | |
| Exception | error |
Properties
View SourceEnhancedStatusCode
Gets the enhanced status code (RFC 3463, e.g. 2.0.0,
5.1.1) from the final server response, or null if the
server did not provide one or DATA was not reached. This is a
convenience accessor for Response!.EnhancedStatusCode.
Declaration
public string? EnhancedStatusCode { get; }
Property Value
| Type | Description |
|---|---|
| string |
Error
Gets the transport or protocol exception that caused the failure, or null if the delivery completed without an exception.
Declaration
public Exception? Error { get; }
Property Value
| Type | Description |
|---|---|
| Exception |
Recipients
Gets the per-recipient results from the RCPT TO commands.
Declaration
public IReadOnlyList<SmtpRecipientResult> Recipients { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<SmtpRecipientResult> |
Response
Gets the final server response (the reply to the DATA command's message body), or null if DATA was not reached.
Declaration
public SmtpResponse? Response { get; }
Property Value
| Type | Description |
|---|---|
| SmtpResponse |
Success
Gets a value indicating whether the message was accepted for delivery by the server.
Declaration
public bool Success { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
View SourceToString()
Returns the string representation of this result.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |