Fixing the "Send-MailMessage" Error:
"Net_io_connectionclosed" and "Exception calling Send with 1 argument"
Step 1 (Optional):
Get a Sendmail test script if you don't have one already:
https://drive.google.com/drive/folder...
Step 2:
Update PowerShell to version 5.0 by installing Windows Management Framework 5.1:
https://www.microsoft.com/en-us/downl...
Note: For Windows Server 2012 R2, use Win8.1AndW2K12R2-KB3191564-x64.msu.
Step 3:
Install Microsoft .NET Framework 4.5.2:
https://www.microsoft.com/he-il/downl...
Note: Use NDP452-KB2901907-x86-x64-AllOS-ENU.
Step 4:
Install TLS 1.2 Client or Server by using IISCrypto:
https://www.nartac.com/Products/IISCr...
Step 5 (if needed):
Run the following PowerShell commands and then reboot:
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Wow6432Node\Microsoft.NetFramework\v4.0.30319' -Name 'SchUseStrongCrypto' -Value '1' -Type DWord
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft.NetFramework\v4.0.30319' -Name 'SchUseStrongCrypto' -Value '1' -Type DWord
Note:
For more information on Transport Layer Security 1.0 and 1.1 disablement, see:
https://docs.microsoft.com/en-us/life...
#tls #powershell #sendmail