public IEnumerable <RecipientListModel> GetLists()
 {
     foreach (var groupName in m_repository.GetAllGroupNames())
     {
         yield return(new RecipientListModel
         {
             GroupName = groupName,
             Addresses = string.Join("; ", m_repository.GetRecipients(groupName))
         });
     }
 }
Exemplo n.º 2
0
        public void SendToGroup(string groupName, string subject, string body, params string[] attachmentFiles)
        {
            var recipients = m_recipientListsRepository.GetRecipients(groupName).ToList();

            if (!recipients.Any())
            {
                m_log.Error($"No recipients for group '{groupName}'");
                return;
            }

            Send(recipients, subject, body, attachmentFiles);
        }