async def ehlo(self, from_host=None):
        """
        Sends a SMTP 'EHLO' command. - Identifies the client and starts the
        session.

        If given ``from`_host`` is None, defaults to the client FQDN.

        For further details, please check out `RFC 5321 § 4.1.1.1`_.

        Args:
            from_host (str or None): Name to use to identify the client.

        Raises:
            ConnectionResetError: If the connection with the server is
                unexpectedely lost.
            SMTPCommandFailedError: If the server refuses our EHLO greeting.

        Returns:
            (int, str): A (code, message) 2-tuple containing the server
                response.

        .. _`RFC 5321 § 4.1.1.1`: https://tools.ietf.org/html/rfc5321#section-4.1.1.1
        """
        if from_host is None:
            from_host = self.fqdn

        code, message = await self.do_cmd("EHLO", from_host)

        self.last_ehlo_response = (code, message)

        extns, auths = SMTP.parse_esmtp_extensions(message)
        self.esmtp_extensions = extns
        self.auth_mechanisms = auths
        self.supports_esmtp = True

        return code, message
async def ehlo ( self , from_host = None ) : if from_host is None : from_host = self . fqdn code , message = await self . do_cmd ( "EHLO" , from_host ) self . last_ehlo_response = ( code , message ) extns , auths = SMTP . parse_esmtp_extensions ( message ) self . esmtp_extensions = extns self . auth_mechanisms = auths self . supports_esmtp = True return code , message
Sends a SMTP 'EHLO' command. - Identifies the client and starts the
        session.

        If given ``from`_host`` is None, defaults to the client FQDN.

        For further details, please check out `RFC 5321 § 4.1.1.1`_.

        Args:
            from_host (str or None): Name to use to identify the client.

        Raises:
            ConnectionResetError: If the connection with the server is
                unexpectedely lost.
            SMTPCommandFailedError: If the server refuses our EHLO greeting.

        Returns:
            (int, str): A (code, message) 2-tuple containing the server
                response.

        .. _`RFC 5321 § 4.1.1.1`: https://tools.ietf.org/html/rfc5321#section-4.1.1.1