Error on Email Configuration - 2023.2

We are getting following error on our bpm’s that are suppose to send emails (2023.2)

“BPM runtime caught an unexpected exception of ‘SslHandshakeException’ type.”

We are using Epicor On Prem Version and are using Legacy SMTP. This works well in Email Setting Maintenance > Send Test Email Button.

what is full error stack in the email log?

Ice.Common.EpicorServerException: BPM runtime caught an unexpected exception of ‘SslHandshakeException’ type.
See more info in the Inner Exception section of Exception Details.
—> MailKit.Security.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.

—> System.Security.Authentication.AuthenticationException: The remote certificate was rejected by the provided RemoteCertificateValidationCallback.
at System.Net.Security.SslStream.SendAuthResetSignal(ProtocolToken message, ExceptionDispatchInfo exception)
at System.Net.Security.SslStream.CompleteHandshake(SslAuthenticationOptions sslAuthenticationOptions)
at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte reAuthenticationData, Boolean isApm)
at System.Net.Security.SslStream.AuthenticateAsClient(SslClientAuthenticationOptions sslClientAuthenticationOptions)
at MailKit.Net.Smtp.SmtpClient.ConnectAsync(String host, Int32 port, SecureSocketOptions options, Boolean doAsync, CancellationToken cancellationToken)
— End of inner exception stack trace —
at MailKit.Net.Smtp.SmtpClient.ConnectAsync(String host, Int32 port, SecureSocketOptions options, Boolean doAsync, CancellationToken cancellationToken)
at MailKit.Net.Smtp.SmtpClient.Connect(String host, Int32 port, SecureSocketOptions options, CancellationToken cancellationToken)
at Ice.Lib.EmailSender.Smtp.SmtpSender.SetupSmtpClient(SmtpSettings settings, ISmtpClient client) in C:_releases\ICE\ICE4.2.400.9\Source\Server\Internal\Lib\EmailSender\Smtp\SmtpSender.cs:line 71
at Ice.Lib.EmailSender.Smtp.SmtpSender…ctor(String company, String userId, SmtpSettings settings) in C:_releases\ICE\ICE4.2.400.9\Source\Server\Internal\Lib\EmailSender\Smtp\SmtpSender.cs:line 22
at Ice.Lib.EmailSender.CompanyEmailSender.CreateSmtpMailer(SmtpSettings smtp, String mailerType) in C:_releases\ICE\ICE4.2.400.9\Source\Server\Internal\Lib\EmailSender\CompanyEmailSender.cs:line 204
at Ice.Lib.EmailSender.CompanyEmailSender.CreateMailer(BaseSettings settings, String mailerType) in C:_releases\ICE\ICE4.2.400.9\Source\Server\Internal\Lib\EmailSender\CompanyEmailSender.cs:line 180
at Ice.Lib.EmailSender.CompanyEmailSender.GetEmailSenderByMailerType(String mailerType) in C:_releases\ICE\ICE4.2.400.9\Source\Server\Internal\Lib\EmailSender\CompanyEmailSender.cs:line 151
at Ice.Lib.EmailSender.CompanyEmailSender.GetDefaultEmailSender() in C:_releases\ICE\ICE4.2.400.9\Source\Server\Internal\Lib\EmailSender\CompanyEmailSender.cs:line 165
at Ice.Lib.EmailSender.CompanyEmailSender.GetEmailSenderForOrigin(EmailOrigin origin) in C:_releases\ICE\ICE4.2.400.9\Source\Server\Internal\Lib\EmailSender\CompanyEmailSender.cs:line 130
at Ice.Lib.EmailSender.CompanyEmailSender.Send(EmailMessage message, EmailOrigin origin, EmailSenderOptions options) in C:_releases\ICE\ICE4.2.400.9\Source\Server\Internal\Lib\EmailSender\CompanyEmailSender.cs:line 45
at Ice.Lib.EmailSender.CompanyEmailSender.Send(EmailMessage message, EmailOrigin origin) in C:_releases\ICE\ICE4.2.400.9\Source\Server\Internal\Lib\EmailSender\CompanyEmailSender.cs:line 38
at Ice.Mail.SmtpMailer.SendCore(SmtpMail message) in C:_releases\ICE\ICE4.2.400.9\Source\Server\Framework\Epicor.Ice\Mail\SmtpMailer.cs:line 78
at Ice.Mail.SmtpMailer.Send(SmtpMail message) in C:_releases\ICE\ICE4.2.400.9\Source\Server\Framework\Epicor.Ice\Mail\SmtpMailer.cs:line 32
at Epicor.Customization.Bpm.BO.UpdatePreProcessingDirective_T1_04959E6BC6D04CB9BEAC624D0517E589.A001_SendMailAction()
at Epicor.Customization.Bpm.BO.UpdatePreProcessingDirective_T1_04959E6BC6D04CB9BEAC624D0517E589.ExecuteCore(Int32 step)
at Epicor.Customization.Bpm.DirectiveBase2.Execute() in C:\_releases\ICE\ICE4.2.400.9\Source\Server\Internal\Lib\Epicor.Customization.Bpm\DirectiveBase.Generic.cs:line 333 at Epicor.Customization.Bpm.DirectiveBase2.Execute(TParam parameters) in C:_releases\ICE\ICE4.2.400.9\Source\Server\Internal\Lib\Epicor.Customization.Bpm\DirectiveBase.Generic.cs:line 183
— End of inner exception stack trace —
at Epicor.Customization.Bpm.DirectiveBase2.Execute(TParam parameters) in C:\_releases\ICE\ICE4.2.400.9\Source\Server\Internal\Lib\Epicor.Customization.Bpm\DirectiveBase.Generic.cs:line 199 at Epicor.Customization.Bpm.MethodCustomizationBase22.<>c__DisplayClass12_0.b__3(MethodDirectiveBase2 dir) in C:\_releases\ICE\ICE4.2.400.9\Source\Server\Internal\Lib\Epicor.Customization.Bpm\MethodCustomizationBase2.cs:line 139 at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable1 source, Func2 predicate, Boolean& found) at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable1 source, Func2 predicate) at Epicor.Customization.Bpm.MethodCustomizationBase22.RunDirectives(TParam parameters) in C:_releases\ICE\ICE4.2.400.9\Source\Server\Internal\Lib\Epicor.Customization.Bpm\MethodCustomizationBase2.cs:line 0
at Epicor.Customization.Bpm.CustomizationBase2`2.Execute(TParam parameters) in C:_releases\ICE\ICE4.2.400.9\Source\Server\Internal\Lib\Epicor.Customization.Bpm\CustomizationBase2.cs:line 95
at Epicor.Customization.Bpm.BO.ABCCodeSvcCustomization.Update(ABCCodeTableset& ds)
at Erp.Services.BO.ABCCodeSvcFacade.Update(ABCCodeTableset& ds) in C:_releases\ERP\ERP11.2.400.0\Source\Server\Services\BO\ABCCode\ABCCodeSvcFacade.cs:line 353
at Erp.Controllers.BO.ABCCodeController.Update(Update_InputModel model) in C:_releases\ERP\ERP11.2.400.0\Source\Server\Services\BO\ABCCode\Generated\ABCCodeController.cs:line 155
at lambda_method4820(Closure , Object , Object )
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
CorrelationId: 96f50cc7-c555-4f62-b007-fecdc2940347

It is not legacy SMTP, it is modern one. Check the settings in the Mail settings, you dont’ have Legacy selected there in the system combobox

That’s the issue , while I select Legacy SMTP or simple SMTP (Under General Settings), Send Test Email Button sends email only when I select Use Legacy SMTP Library.
However, the same setting doesn’t help while I send Email using BPM Widget.
This seems that BPM Widget Email are not considering the setting from email setting maintenance.


Usually, you select Legacy SMTP for System Email Application and it uses it in BPM.
Check if you saved it correctly.

1 Like

The settings were saved as Legacy, then only it was allowing email from Test Email Button.
Today - I copied the New Client to my Local Computer and tried again. This worked !