Correction: IdTable was not accessable from mail.messageThread() because of closure scope limitations. Added getIdTable() function to access it