internal static IAsyncResult BeginSend(SmtpConnection conn, string to, AsyncCallback callback, object state) { PrepareCommand(conn, to); return(CheckCommand.BeginSend(conn, callback, state)); }
internal static string[] Send(SmtpConnection conn, string domain) { PrepareCommand(conn, domain); return(CheckResponse(ReadLinesCommand.Send(conn))); }
internal static IAsyncResult BeginSend(SmtpConnection conn, byte[] command, MailAddress from, bool allowUnicode, AsyncCallback callback, object state) { PrepareCommand(conn, command, from, allowUnicode); return(CheckCommand.BeginSend(conn, callback, state)); }
internal static IAsyncResult BeginSend(SmtpConnection conn, string domain, AsyncCallback callback, object state) { PrepareCommand(conn, domain); return(ReadLinesCommand.BeginSend(conn, callback, state)); }
internal static LineInfo Send(SmtpConnection conn, string message) { PrepareCommand(conn, message); return(CheckResponse(ReadLinesCommand.Send(conn))); }
private static void PrepareCommand(SmtpConnection conn, string message) { conn.BufferBuilder.Append(message); conn.BufferBuilder.Append(SmtpCommands.CRLF); }
internal static IAsyncResult BeginSend(SmtpConnection conn, string type, string message, AsyncCallback callback, object state) { PrepareCommand(conn, type, message); return(ReadLinesCommand.BeginSend(conn, callback, state)); }
internal static LineInfo[] Send(SmtpConnection conn) { conn.Flush(); return(conn.Reader.GetNextReplyReader().ReadLines()); }