def absent(name, **kwargs):
    '''
    Ensures that the mediatype does not exist, eventually deletes the mediatype.

    :param name: name of the mediatype
    :param _connection_user: Optional - zabbix user (can also be set in opts or pillar, see module's docstring)
    :param _connection_password: Optional - zabbix password (can also be set in opts or pillar, see module's docstring)
    :param _connection_url: Optional - url of zabbix frontend (can also be set in opts, pillar, see module's docstring)

    .. code-block:: yaml

        delete_mediatype:
            zabbix_mediatype.absent:
                - name: 'Email'
    '''
    connection_args = {}
    if '_connection_user' in kwargs:
        connection_args['_connection_user'] = kwargs['_connection_user']
    if '_connection_password' in kwargs:
        connection_args['_connection_password'] = kwargs['_connection_password']
    if '_connection_url' in kwargs:
        connection_args['_connection_url'] = kwargs['_connection_url']

    ret = {'name': name, 'changes': {}, 'result': False, 'comment': ''}

    # Comment and change messages
    comment_mediatype_deleted = 'Mediatype {0} deleted.'.format(name)
    comment_mediatype_notdeleted = 'Unable to delete mediatype: {0}. '.format(name)
    comment_mediatype_notexists = 'Mediatype {0} does not exist.'.format(name)
    changes_mediatype_deleted = {name: {'old': 'Mediatype {0} exists.'.format(name),
                                        'new': 'Mediatype {0} deleted.'.format(name),
                                        }
                                 }

    mediatype_exists = __salt__['zabbix.mediatype_get'](name, **connection_args)

    # Dry run, test=true mode
    if __opts__['test']:
        if not mediatype_exists:
            ret['result'] = True
            ret['comment'] = comment_mediatype_notexists
        else:
            ret['result'] = None
            ret['comment'] = comment_mediatype_deleted
        return ret

    if not mediatype_exists:
        ret['result'] = True
        ret['comment'] = comment_mediatype_notexists
    else:
        try:
            mediatypeid = mediatype_exists[0]['mediatypeid']
            mediatype_delete = __salt__['zabbix.mediatype_delete'](mediatypeid, **connection_args)
        except KeyError:
            mediatype_delete = False

        if mediatype_delete and 'error' not in mediatype_delete:
            ret['result'] = True
            ret['comment'] = comment_mediatype_deleted
            ret['changes'] = changes_mediatype_deleted
        else:
            ret['result'] = False
            ret['comment'] = comment_mediatype_notdeleted + six.text_type(mediatype_delete['error'])

    return ret