worker for fetching images from an imap server