LumiSoft.Net.SMTP.Server.SMTP_Session.EHLO C# (CSharp) Method

EHLO() private method

private EHLO ( string argsText ) : void
argsText string
return void
        private void EHLO(string argsText)
        {
            /* Rfc 2821 4.1.1.1
            These commands, and a "250 OK" reply to one of them, confirm that
            both the SMTP client and the SMTP server are in the initial state,
            that is, there is no transaction in progress and all state tables and
            buffers are cleared.
            */

            m_EhloName = argsText;

            ResetState();

            //--- Construct supported AUTH types value ----------------------------//
            string authTypesString = "";
            if((m_pServer.SupportedAuthentications & SaslAuthTypes.Login) != 0){
                authTypesString += "LOGIN ";
            }
            if((m_pServer.SupportedAuthentications & SaslAuthTypes.Cram_md5) != 0){
                authTypesString += "CRAM-MD5 ";
            }
            if((m_pServer.SupportedAuthentications & SaslAuthTypes.Digest_md5) != 0){
                authTypesString += "DIGEST-MD5 ";
            }
            authTypesString = authTypesString.Trim();
            //-----------------------------------------------------------------------//

            string reply = "";
                reply += "250-" + m_pServer.HostName + " Hello [" + this.RemoteEndPoint.Address.ToString() + "]\r\n";
                reply += "250-PIPELINING\r\n";
                reply += "250-SIZE " + m_pServer.MaxMessageSize + "\r\n";
            //		reply += "250-DSN\r\n";
            //		reply += "250-HELP\r\n";
                reply += "250-8BITMIME\r\n";
                reply += "250-BINARYMIME\r\n";
                reply += "250-CHUNKING\r\n";
                if(authTypesString.Length > 0){
                    reply += "250-AUTH " + authTypesString +  "\r\n";
                }
                reply += "250 Ok\r\n";

            m_pSocket.BeginSendData(reply,null,new SocketCallBack(this.EndSend));

            m_CmdValidator.Helo_ok = true;
        }