private bool CheckEmailClientConfigWithDirtyPassword(EmailClientConfig config) { return(config.EnableSsl == _incomingSettings.EnableSsl && config.AccountPassword == DecryptedPassword && config.AccountUsername == _incomingSettings.AccountUsername && config.ClientType == _incomingSettings.ServerType && config.Port == _incomingSettings.Port && config.ServerAddress == _incomingSettings.ServerAddress); }
private async Task <EmailClientConfig> GetEmailClientConfig(EmailIncomingSettings incomingSettings) { var emailClientConfig = new EmailClientConfig() { ServerAddress = incomingSettings.ServerAddress, Port = incomingSettings.Port, ClientType = incomingSettings.ServerType, AccountUsername = incomingSettings.AccountUsername, AccountPassword = incomingSettings.AccountPassword, EnableSsl = incomingSettings.EnableSsl }; if (!incomingSettings.IsPasswordDirty) { var emailSettings = await _instanceSettingsRepository.GetEmailSettings(); emailClientConfig.AccountPassword = SystemEncryptions.DecryptFromSilverlight(emailSettings.IncomingPassword); } return(emailClientConfig); }
public EmailProvider(IOptions <EmailClientConfig> config) { configuration = config.Value; }
public EmailSender(IOptionsSnapshot <EmailClientConfig> clientOptions, INotificationComposer notificationComposer) { _clientOptions = clientOptions.Value; _notificationComposer = notificationComposer; }