Set Application credential key in SharePoint 2019
To solve this issue "couldn't store the SMTP password. The application credential key wasn't found on the local server or there was an encryption error.", you have to set the application credential key, by running the following command on each SharePoint server:
Set Application Credential Key PowerShell Example:
$key = ConvertTo-SecureString -AsPlainText -Force "The "application credential key" # is the password to be used to encrypt and decrypt the SMTP password.
Set-SPApplicationCredentialKey $key
Note: Repeat the command on each additional SharePoint server in the farm, using the same application credential key.
Remove Application credential key in SharePoint 2019
If you want to remove the application credential key from the local server, use the Remove-SPApplicationCredentialKey
cmdlet as below:
Remove-SPApplicationCredentialKey -Confirm:$false