Add Imap library and try fix bug with object type.