async def ehlo(
        self, hostname: str = None, timeout: DefaultNumType = _default
    ) -> SMTPResponse:
        """
        Send the SMTP EHLO command.
        Hostname to send for this command defaults to the FQDN of the local
        host.

        :raises SMTPHeloError: on unexpected server response code
        """
        if hostname is None:
            hostname = self.source_address

        async with self._command_lock:
            response = await self.execute_command(
                b"EHLO", hostname.encode("ascii"), timeout=timeout
            )
        self.last_ehlo_response = response

        if response.code != SMTPStatus.completed:
            raise SMTPHeloError(response.code, response.message)

        return response
async def ehlo ( self , hostname : str = None , timeout : DefaultNumType = _default ) -> SMTPResponse : if hostname is None : hostname = self . source_address async with self . _command_lock : response = await self . execute_command ( b"EHLO" , hostname . encode ( "ascii" ) , timeout = timeout ) self . last_ehlo_response = response if response . code != SMTPStatus . completed : raise SMTPHeloError ( response . code , response . message ) return response
Send the SMTP EHLO command.
        Hostname to send for this command defaults to the FQDN of the local
        host.

        :raises SMTPHeloError: on unexpected server response code