public override async Task <ValidateSmtpSettingsReply> ValidateSmtpSettings(SmtpSettingsMessage request, ServerCallContext context) { SmtpCredentials credentials = new SmtpCredentials { Hostname = request.Hostname, Password = request.Password, Port = request.Port, SenderAddress = request.SenderAddress, Username = request.Username, }; return(new ValidateSmtpSettingsReply { Success = await _smtpConnectivityChecker.CheckConnectivityAsnc(credentials), }); }
public override async Task <ChangeSmtpSettingsReply> ChangeSmtpSettings(SmtpSettingsMessage request, ServerCallContext context) { SmtpCredentials credentials = new SmtpCredentials { Hostname = request.Hostname, Password = request.Password, Port = request.Port, SenderAddress = request.SenderAddress, Username = request.Username }; await _smtpCredentialManager.StoreCredentialsAsync(credentials); return(new ChangeSmtpSettingsReply { Success = true, }); }