Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
EHelloCommand.cs
Go to the documentation of this file.
1namespace System.Net.Mail;
2
3internal static class EHelloCommand
4{
5 internal static IAsyncResult BeginSend(SmtpConnection conn, string domain, AsyncCallback callback, object state)
6 {
7 PrepareCommand(conn, domain);
8 return ReadLinesCommand.BeginSend(conn, callback, state);
9 }
10
11 private static string[] CheckResponse(LineInfo[] lines)
12 {
13 if (lines == null || lines.Length == 0)
14 {
16 }
17 if (lines[0].StatusCode != SmtpStatusCode.Ok)
18 {
19 if (lines[0].StatusCode < (SmtpStatusCode)400)
20 {
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 }
32
33 internal static string[] EndSend(IAsyncResult result)
34 {
36 }
37
38 private static void PrepareCommand(SmtpConnection conn, string domain)
39 {
40 if (conn.IsStreamOpen)
41 {
43 }
45 conn.BufferBuilder.Append(domain);
47 }
48
49 internal static string[] Send(SmtpConnection conn, string domain)
50 {
51 PrepareCommand(conn, domain);
53 }
54}
static string[] Send(SmtpConnection conn, string domain)
static string[] CheckResponse(LineInfo[] lines)
static string[] EndSend(IAsyncResult result)
static IAsyncResult BeginSend(SmtpConnection conn, string domain, AsyncCallback callback, object state)
static void PrepareCommand(SmtpConnection conn, string domain)
static LineInfo[] EndSend(IAsyncResult result)
static IAsyncResult BeginSend(SmtpConnection conn, AsyncCallback callback, object state)
static LineInfo[] Send(SmtpConnection conn)
static readonly byte[] EHello
static readonly byte[] CRLF
static string net_webstatus_ServerProtocolViolation
Definition SR.cs:152
static string SmtpDataStreamOpen
Definition SR.cs:154
static string SmtpEhloResponseInvalid
Definition SR.cs:156
Definition SR.cs:7