Return port and factory from the imap launch method