bootstrap encapsulation of imap stuff