コード例 #1
0
ファイル: Tests.cs プロジェクト: ludwigdn/secret-santa
        public void MailProviderSettingsTest(MailProvider provider, string host, string port)
        {
            var settings = MailProviderSettings.Get(provider);

            Assert.AreEqual(host, settings.SMTP_HOST);
            Assert.AreEqual(port, settings.SMTP_PORT);
        }
コード例 #2
0
        public MailProviderSettings GetMailProviderSettingsById(Guid id)
        {
            var mailProvider         = EmailCollectMailboxUtilities.GetMailProviderByUId(UserConnection, id);
            var mailProviderSettings = new MailProviderSettings()
            {
                AllowEmailDownloading = mailProvider.GetTypedColumnValue <bool>("AllowEmailDownloading"),
                AllowEmailSending     = mailProvider.GetTypedColumnValue <bool>("AllowEmailSending")
            };

            return(mailProviderSettings);
        }
コード例 #3
0
        private MailProviderSettings GetMailProviderSettings()
        {
            var settings = MailProviderSettings.Get(AskMailProviderQuestion());

            if (settings == null)
            {
                settings = AskCustomMailProviderSettings();
            }

            return(settings);
        }
コード例 #4
0
 public EmailService(IOptions <MailProviderSettings> mailSettings)
 {
     _mailSettings = mailSettings.Value;
 }