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); }
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); }
private MailProviderSettings GetMailProviderSettings() { var settings = MailProviderSettings.Get(AskMailProviderQuestion()); if (settings == null) { settings = AskCustomMailProviderSettings(); } return(settings); }
public EmailService(IOptions <MailProviderSettings> mailSettings) { _mailSettings = mailSettings.Value; }