def get_servers():
    '''
    Get the SMTP virtual server names.

    :return: A list of the SMTP virtual servers.
    :rtype: list

    CLI Example:

    .. code-block:: bash

        salt '*' win_smtp_server.get_servers
    '''
    ret = list()

    with salt.utils.winapi.Com():
        try:
            connection = wmi.WMI(namespace=_WMI_NAMESPACE)
            objs = connection.IIsSmtpServerSetting()

            for obj in objs:
                ret.append(str(obj.Name))
        except wmi.x_wmi as error:
            _LOG.error('Encountered WMI error: %s', error.com_error)
        except (AttributeError, __HOLE__) as error:
            _LOG.error('Error getting IIsSmtpServerSetting: %s', error)

    _LOG.debug('Found SMTP servers: %s', ret)
    return ret
dataset/ETHPy150Open saltstack/salt/salt/modules/win_smtp_server.py/get_servers