Identity Server SMTP config

I have just upgraded Orchestrator to 2021.4.2 and password resets are not working as emails cannot be sent. The host tenant SMTP settings have been updated to the correct SMTP details but it seems these are not being picked up by the Identity server. Where does the Identity server component get its SMTP details from? Sending a test email from the Orchestrator SMTP settings page works fine, but password reset emails do not. I need to update the settings Identity server is using and remove the use of SSL. This is the logged error:

UiPath.IdentityServer.Web.Middleware.ExceptionHandlingMiddleware Failed to send email, please check your email server settings.
SmtpExceptionFailed to send email, please check your email server settings. at UiPath.IdentityServer.Application.Services.EmailService.SendEmailAsync(ApplicationUser user, String subject, String body)
at UiPath.IdentityServer.Web.Application.Services.UserService.SendResetPasswordEmailAsync(String usernameOrEmail, String tenantName)
at UiPath.IdentityServer.Web.Controllers.API.AccountController.ForgotPassword(ForgotPasswordModel model)
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at UiPath.IdentityServer.Web.Extensions.Configuration.ClearCacheConfiguration.<>c.<b__1_0>d.MoveNext()
— End of stack trace from previous location where exception was thrown —
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
at UiPath.IdentityServer.Web.Middleware.CancellationTokenRegisterMiddleware.InvokeAsync(HttpContext httpContext)
at UiPath.IdentityServer.Web.Middleware.ExceptionHandlingMiddleware.InvokeAsync(HttpContext httpContext) SslHandshakeException*An error occurred while attempting to establish an SSL or TLS connection.

The server’s SSL certificate could not be validated for the following reasons:
• The server certificate has the following errors:
• The revocation function was unable to check revocation for the certificate.
• The revocation function was unable to check revocation because the revocation server was offline.
• An intermediate certificate has the following errors:
• The revocation function was unable to check revocation for the certificate.
• The revocation function was unable to check revocation because the revocation server was offline.

  • at MailKit.Net.Smtp.SmtpClient.ConnectAsync(String host, Int32 port, SecureSocketOptions options, Boolean doAsync, CancellationToken cancellationToken)
    at UiPath.IdentityServer.Application.Services.MailClientFactory.CreateForConfigAsync(SmtpClientConfiguration clientConfiguration)
    at UiPath.IdentityServer.Application.Services.EmailService.SendEmailAsync(ApplicationUser user, String subject, String body) AuthenticationExceptionThe remote certificate is invalid according to the validation procedure. at System.Net.Security.SslStream.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, ExceptionDispatchInfo exception)
    at System.Net.Security.SslStream.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
    at System.Net.Security.SslStream.StartSendBlob(Byte incoming, Int32 count, AsyncProtocolRequest asyncRequest)
    at System.Net.Security.SslStream.ProcessReceivedBlob(Byte buffer, Int32 count, AsyncProtocolRequest asyncRequest)
    at System.Net.Security.SslStream.StartReadFrame(Byte buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
    at System.Net.Security.SslStream.StartReceiveBlob(Byte buffer, AsyncProtocolRequest asyncRequest)
    at System.Net.Security.SslStream.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
    at System.Net.Security.SslStream.StartSendBlob(Byte incoming, Int32 count, AsyncProtocolRequest asyncRequest)
    at System.Net.Security.SslStream.ProcessReceivedBlob(Byte buffer, Int32 count, AsyncProtocolRequest asyncRequest)
    at System.Net.Security.SslStream.StartReadFrame(Byte buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
    at System.Net.Security.SslStream.PartialFrameCallback(AsyncProtocolRequest asyncRequest)
    — End of stack trace from previous location where exception was thrown —
    at System.Net.Security.SslStream.ThrowIfExceptional()
    at System.Net.Security.SslStream.InternalEndProcessAuthentication(LazyAsyncResult lazyResult)
    at System.Net.Security.SslStream.EndProcessAuthentication(IAsyncResult result)
    at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult)
    at System.Net.Security.SslStream.<>c.b__64_2(IAsyncResult iar)
    at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization)
    — End of stack trace from previous location where exception was thrown —
    at MailKit.Net.Smtp.SmtpClient.ConnectAsync(String host, Int32 port, SecureSocketOptions options, Boolean doAsync, CancellationToken cancellationToken

Nobody can tell me?