retcode, messages = conn.search(None, '(UNSEEN)')
if retcode == 'OK':
    for message in messages[0].split(' '):
        print('Processing :', message)
ret, mesginfo = conn.fetch(message, '(BODY[HEADER.FIELDS (SUBJECT FROM)])')
if ret == 'OK':
    pass
Retrieve ONLY new message from email