Sends the given command to the server.

        Args:
            *args: Command and arguments to be sent to the server.

        Raises:
            ConnectionResetError: If the connection with the server is
                unexpectedely lost.
            SMTPCommandFailedError: If the command fails.

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

async def do_cmd(self, *args, success=None):
        """
        Sends the given command to the server.

        Args:
            *args: Command and arguments to be sent to the server.

        Raises:
            ConnectionResetError: If the connection with the server is
                unexpectedely lost.
            SMTPCommandFailedError: If the command fails.

        Returns:
            (int, str): A (code, message) 2-tuple containing the server
                response.
        """
        if success is None:
            success = (250,)

        cmd = " ".join(args)

        await self.writer.send_command(cmd)
        code, message = await self.reader.read_reply()

        if code not in success:
            raise SMTPCommandFailedError(code, message, cmd)

        return code, message