Updated the ImapClientDemo sample to use MessagesArrived