Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CheckResponse()

static string[] System.Net.Mail.EHelloCommand.CheckResponse ( LineInfo[] lines)
inlinestaticprivate

Definition at line 11 of file EHelloCommand.cs.

12 {
13 if (lines == null || lines.Length == 0)
14 {
15 throw new SmtpException(System.SR.SmtpEhloResponseInvalid);
16 }
17 if (lines[0].StatusCode != SmtpStatusCode.Ok)
18 {
19 if (lines[0].StatusCode < (SmtpStatusCode)400)
20 {
21 throw new SmtpException(System.SR.net_webstatus_ServerProtocolViolation, lines[0].Line);
22 }
23 throw new SmtpException(lines[0].StatusCode, lines[0].Line, serverResponse: true);
24 }
25 string[] array = new string[lines.Length - 1];
26 for (int i = 1; i < lines.Length; i++)
27 {
28 array[i - 1] = lines[i].Line;
29 }
30 return array;
31 }
static string net_webstatus_ServerProtocolViolation
Definition SR.cs:152
static string SmtpEhloResponseInvalid
Definition SR.cs:156
Definition SR.cs:7

References System.array, System.Net.Mail.LineInfo.Line, System.SR.net_webstatus_ServerProtocolViolation, and System.SR.SmtpEhloResponseInvalid.

Referenced by System.Net.Mail.EHelloCommand.EndSend(), and System.Net.Mail.EHelloCommand.Send().