Added getMailboxes function

Just want to see how this code would fail in travis. Possibly get this patch moved into core. Though there is an issue with the requirement of mb_convert_encoding not being a default enabled function. I'm inviting discussion on how to fix this.