Пример #1
0
        public bool SendEmail(EmailTypes type, ITranslator translator)
        {
            if (translator == null)
            {
                throw new ArgumentNullException(nameof(translator));
            }
            string emailContent      = myEmailContentCreator.GetEmailContent(type);
            string translatedContent = translator.Translate(emailContent);

            if (myEmailSendingService.Send(translatedContent))
            {
                EmailSent?.Invoke(this, EventArgs.Empty);
                return(true);
            }
            return(false);
        }