(
    account_key, folder_name,
    query=None, expected_uid_count=None, check_unread_uids=None,
)
return emails, deleted_uids, read_uids, meta
Get new emails and any deleted UIDs for a folder within an account.
Get new emails and any deleted UIDs for a folder within an account.
Get new emails and any deleted UIDs for a folder within an account .
def sync_folder_emails(
    account_key, folder_name,
    query=None, expected_uid_count=None, check_unread_uids=None,
):
    '''
    Get new emails and any deleted UIDs for a folder within an account.
    '''

    account = get_account(account_key)
    folder = account.get_folder(folder_name, query=query)

    emails, deleted_uids, read_uids = folder.sync_emails(
        expected_uid_count=expected_uid_count,
        check_unread_uids=check_unread_uids,
    )

    meta = {
        'count': len(folder),
        'exists': folder.exists,
    }

    return emails, deleted_uids, read_uids, meta
def sync_folder_emails ( account_key , folder_name , query = None , expected_uid_count = None , check_unread_uids = None , ) : account = get_account ( account_key ) folder = account . get_folder ( folder_name , query = query ) emails , deleted_uids , read_uids = folder . sync_emails ( expected_uid_count = expected_uid_count , check_unread_uids = check_unread_uids , ) meta = { 'count' : len ( folder ) , 'exists' : folder . exists , } return emails , deleted_uids , read_uids , meta