Knowledge Base

Our dedicated Product Specialist team is always ready to help you when you need it the most. Contact Support

Failure sending mail error

If you receive the following error in the event logs when attempting to send email notifications, please follow the below steps. This is due to the product not using TLS 1.2 unless you explicitly tell it to:

System.Net.Mail.SmtpException: Failure sending mail. ---> System.IO.IOException: Unable to read data from the transport connection: net_io_connectionclosed.
   at System.Net.Mail.SmtpReplyReaderFactory.ProcessRead(Byte[] buffer, Int32 offset, Int32 read, Boolean readLine)
   at System.Net.Mail.SmtpReplyReaderFactory.ReadLines(SmtpReplyReader caller, Boolean oneLine)
   at System.Net.Mail.SmtpReplyReaderFactory.ReadLine(SmtpReplyReader caller)
   at System.Net.Mail.CheckCommand.Send(SmtpConnection conn, String& response)
   at System.Net.Mail.MailCommand.Send(SmtpConnection conn, Byte[] command, MailAddress from, Boolean allowUnicode)
   at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, Boolean allowUnicode, SmtpFailedRecipientException& exception)
   at System.Net.Mail.SmtpClient.Send(MailMessage message)
   --- End of inner exception stack trace ---
   at System.Net.Mail.SmtpClient.Send(MailMessage message)
   at Specopssoft.Spex.Administration.Model.EmailSender.EmailSenderWorker.DequeueAndSendEmails()

There are 2 options that will fix this issue:

Option 1:

Modify the config file located here: “C:\Program Files\Specopssoft\Specops Password Notification\Server\Specopssoft.Spex.Service.exe.config” and restart the service.

Change the current text to:

<?xml version=”1.0″?>

<configuration>

                             <runtime>

                                                          <generatePublisherEvidence enabled=”false” />

                                                          <AppContextSwitchOverrides value=”Switch.System.Net.DontEnableSchUseStrongCrypto=false;Switch.System.Net.DontEnableSystemDefaultTlsVersions=false;Switch.System.ServiceModel.DisableUsingServicePointManagerSecurityProtocols=false;Switch.Switch.System.ServiceModel.DontEnableSystemDefaultTlsVersions=false”/>

                             </runtime>

                             <startup>

                                                          <!– Preferred runtime version goes first –>

                                                          <supportedRuntime version=”v4.0″/>

                                                          <supportedRuntime version=”v2.0.50727″/>

                             </startup>

</configuration>

Option 2:

This option involves modifying the registry on the Password Notification server and will require a reboot of the server:

[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v2.0.50727]
"SystemDefaultTlsVersions"=dword:00000001
"SchUseStrongCrypto"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319]
"SystemDefaultTlsVersions"=dword:00000001
"SchUseStrongCrypto"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v2.0.50727]
"SystemDefaultTlsVersions"=dword:00000001
"SchUseStrongCrypto"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319]
"SystemDefaultTlsVersions"=dword:00000001
"SchUseStrongCrypto"=dword:00000001


Publication date: March 1, 2022
Modification date: March 1, 2022

Was this article helpful?

Related Articles