public IMessage Merge(string templateName, CultureInfo cultureInfo, IDictionary <string, object> properties, IEnumerable <string> toAddress, IEnumerable <string> ccAddress = null, IEnumerable <string> bccAddress = null)
        {
            var template = repository.Find(templateName, cultureInfo);

            if (template == null)
            {
                Logger.ErrorFormat("{0}: Cannot merge, template not found for culture '{1}'", templateName, cultureInfo);
                return(null);
            }

            return(template.Merge(properties, toAddress, ccAddress, bccAddress));
        }
        /// <copydoc cref="IMessageTemplateDispatcher.Send" />
        public void Send(string templateName, CultureInfo cultureInfo, IDictionary <string, object> properties, IEnumerable <string> toAddress, IEnumerable <string> ccAddress = null, IEnumerable <string> bccAddress = null)
        {
            var template = repository.Find(templateName, cultureInfo);

            if (template == null)
            {
                Logger.ErrorFormat("{0}: Cannot send, template not found for culture '{1}'", templateName, cultureInfo);
                return;
            }

            var message = template.Merge(properties, toAddress, ccAddress, bccAddress);

            OnSend(message);

            dispatcher.Send(message);
        }