public void SendMessage(Message message, Person recipient, string senderDisplayName = null) { var messageRecipients = new List <MessageRecipient> { new MessageRecipient { EmailAddress = recipient.Email, Name = string.Format("{0} {1}", recipient.FirstName, recipient.LastName) } }; _msgCoordinatorSvc.SendMessage(message, messageRecipients, senderDisplayName); }
public void SendMessageToDisasterVolunteers(RecipientCriterion recipientCriterion, Message message) { var volunteers = _adminSvc.GetVolunteersForDate(recipientCriterion.DisasterId, DateTime.Today); var messageRecipients = new List <MessageRecipient>(); foreach (var volunteer in volunteers) { messageRecipients.Add(new MessageRecipient { EmailAddress = volunteer.Email, Name = string.Format("{0} {1}", volunteer.FirstName, volunteer.LastName) }); } _msgCoordinatorSvc.SendMessage(message, messageRecipients); }