The IRecipientSource interface can be implemented to fetch recipients from essentially any data source depending on what code is used to implement the methods to fetch the recipients.
An IRecipientSource implementation can present one or multiple recipient containers (essentially recipient lists) which are grouped by site (aka section in EPiMail).
The definition of the recipientcontainers themselves can be hardcoded in the IRecipientSource implementation in the simplest scenario, or be loaded dynimcally somehow depending on requirements.
The main requirement is essentially that you can get the email address and a GUID for each recipient, so that you can create the recipient instances as necessary.
Note: If you will have large number of recipients that are to be fetched from a lock congested table it may be necessary to create some type of prepopulated "cache" table that can be repopulated during low-traffic hours or similar.
I've actually written a blog post about a Custom Recipient Source for EPiServer Mail 4, but the server is... missing. I'll try to find some time to write a new post, but I have the source here. Use "as is" and be sure to backup 'n stuff.
http://viktor.likeablestudios.com/recipientsource.zip
Hi,
Do anyone here have experience from implementing a dynamic recipient list, based on the membership/Users tables that comes with the standard .NET provider concept? Basically we would like to use our user data (resides in a User-table in the EPiServer CMS database) as a source for recipient lists, but I'm not really sure how I should implement this IRecipientSource interface.
In the sample there are tables like RecipientSourceContainers and RecipientSourceSubscriptions and so on. Do I need to add such tables to my CMS database, and what is the relationship to the EPiServer Mail database?
Simply put; we would just like to have a bit flag, "IsSubscriber" in our Users-table, from which a RecipientSource class will fetch subscribers. How can we achieve this? Any suggestions on how to do this setup is highly appreciated!
Thanks