2using System.Collections.Generic;
69 private string originalRecipient =
null;
70 private string originalRecipientType =
null;
71 private string finalRecipient =
null;
72 private string finalRecipientType =
null;
73 private Action? action =
null;
74 private int[] status =
null;
75 private string remoteMta =
null;
76 private string remoteMtaType =
null;
77 private string diagnosticCode =
null;
78 private string diagnosticCodeType =
null;
79 private string finalLogId =
null;
80 private DateTimeOffset? lastAttemptDate =
null;
81 private DateTimeOffset? willRetryUntil =
null;
98 protected override bool Parse(
string Key,
string Value)
100 switch (Key.ToUpper())
102 case "ORIGINAL-RECIPIENT":
103 if (this.
ParseType(ref Value, out this.originalRecipientType))
105 this.originalRecipient = Value;
111 case "FINAL-RECIPIENT":
112 if (this.
ParseType(ref Value, out this.finalRecipientType))
114 this.finalRecipient = Value;
130 string[] Parts = Value.Split(
'.');
131 if (Parts.Length == 3 &&
132 int.TryParse(Parts[0], out
int s1) &&
133 int.TryParse(Parts[1], out
int s2) &&
134 int.TryParse(Parts[2], out
int s3))
136 this.status =
new int[] { s1, s2, s3 };
143 if (this.
ParseType(ref Value, out this.remoteMtaType))
145 this.remoteMta = Value;
151 case "DIAGNOSTIC-CODE":
152 if (this.
ParseType(ref Value, out this.diagnosticCodeType))
154 this.diagnosticCode = Value;
160 case "LAST-ATTEMPT-DATE":
163 this.lastAttemptDate = DTO;
170 this.finalLogId = Value;
173 case "WILL-RETRY-UNTIL":
176 this.willRetryUntil = DTO;
Helps with parsing of commong data types.
static bool TryParseRfc822(string s, out DateTimeOffset Value)
Parses a date and time value encoded according to RFC 822, §5.
Base class for DSN field classes.
bool ParseType(ref string Value, out string Type)
Parses a type value prefixed to the field value.
Information fields for one recipient.
string RemoteMtaType
Type of Remote Message Transfer Agent
string DiagnosticCode
Diagnostic code
string FinalLogId
Final Log ID
string OriginalRecipient
Original recipient
string FinalRecipient
Final recipient
PerRecipientFields(string[] Rows)
Information fields for one recipient.
DateTimeOffset? LastAttemptDate
Timepoint of last attempt
DateTimeOffset? WillRetryUntil
Until when retries will be made
override bool Parse(string Key, string Value)
Parses a field
string OriginalRecipientType
Type of original recipient
string DiagnosticCodeType
Type of Diagnostic code
string RemoteMta
Remote Message Transfer Agent
string FinalRecipientType
Type of final recipient
Action
The Action field indicates the action performed by the Reporting-MTA as a result of its attempt to de...