Added missing import and check for mailbox status to tag it as being used