def get_emailids_query(conn_, query_='', qtype_='from', qexplicit_=False, **kwargs):
    """
    Get all email ids from the emails after a simple query.  Accepts explicit queries or one structures through query_ and qtype_

    (Dev note: should be created more robust for future use!)
    """
    assert qtype_.upper() in ['FROM', 'SUBJECT'], 'query type not developed!'

    # Construct the query when not an explicit query
    if not qexplicit_:
            query_ = 'HEADER ' + qtype_.upper() + ' \"' + query_ + '\"'

    # Make the search
    _, data_ = conn_.search(None, query_)

    return data_[0].split()