Hello,
I’ve just upgraded from 2018.X to 2019.5.4 and we are now encountering an issue with sending emails. This occurs using the Send Email deployment step or via the administration SMTP test page.
We have configured Octopus to use SMTP port 25 and SSL/TLS is not checked.
When sending an email we receive the following error:
An error occurred while attempting to establish an SSL or TLS connection.
The SSL certificate presented by the server is not trusted by the system for one or more of the following reasons:
1. The server is using a self-signed certificate which cannot be verified.
2. The local system is missing a Root or Intermediate certificate needed to verify the server's certificate.
3. The certificate presented by the server is expired or invalid.
See https://github.com/jstedfast/MailKit/blob/master/FAQ.md#InvalidSslCertificate for possible solutions.
MailKit.Security.SslHandshakeException
at MailKit.Net.Smtp.SmtpClient.ConnectAsync
at MailKit.Net.Smtp.SmtpClient.Connect(String host, Int32 port, SecureSocketOptions options, CancellationToken cancellationToken)
at Octopus.Core.Util.SmtpClient.SmtpClientWrapper.CreateSmtpClient(SmtpConfiguration configuration, CancellationToken token)
at Octopus.Core.Util.SmtpClient.SmtpClientWrapper.Send(SmtpConfiguration configuration, MailMessage message, CancellationToken token)
at Octopus.Server.Orchestration.ServerTasks.TestEmail.TestEmailTaskController.Execute()
at Octopus.Server.Orchestration.ServerTasks.RunningTask.RunMainThread()
--Inner Exception--
The remote certificate is invalid according to the validation procedure.
System.Security.Authentication.AuthenticationException
at System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception)
As stated, we’re not using SSL/TLS so we’re not sure why this error is displaying. We are using an Exchange server on our local domain for sending.
Any thoughts on this?