I know that List Manager is just a filtered lookup xDB contacts. But is it possible to create a list that has custom c# pipelines. That could call out to an API and returns an IEnumerable of email addresses?
I spent some time to have a look deeper at the List Management tool. Finally I didn't find a way how we can "inject" custom code to load "external" list of email address.
But anyway, even if you find a way how to implement it, in my point of view, we have a few reasons why it is not a good idea:
- As you mentioned in the question, Sitecore List is not really a list of address, it is a list of Contacts;
- When you choose lists during setting up an EXM email campaign, you don't assign email addresses for the campaign, you just assign list ids for it. Contacts populating happens during dispatching process;
- EXM expects contacts as a source or target for sending emails. It extends a links with a keys built based on the contact id. It allows EXM to track clicks, opens and another events associated with email. But if you decided somehow to use independent email addresses, you will definitely lose an ability using all power of EXM email analytic.
Finally, I had the following ideas how to achieve your goal. I haven't found a solution, maybe you will:
- I thought we can implement custom List Provider, but I didn't find a configuration which allows us to load it. So I didn't find any List Provider at all;
- Lists have sources. I though we can "inject" something as a source for a list, but I also didn't find how to do that.
From the comments it seems a lot like you want the ability to update the target list at will.
It is possible to add/remove contacts to a specific list. At what point to do so would depends on your application, it might be as asset owner changes are saved or during some kind of sync with an external store.