using a service provider to inject imap functionality