isEncrypted() returns true and I assume that the encryption works.
But the problem is when I send the E-Mail using SmtpClient client.send() method, I get the following error:
class com.aspose.email.SmtpException: Failure sending mail. —> class com.aspose.email.system.exceptions.InvalidOperationException: Operation is not valid due to the current state of the object.
This issue is observed and logged under Id:EMAILNET-39002 for detailed analysis. You will be automatically notified once any update is available in this regard.
We investigated this at our end and were not able to reproduce it using the latest version of the API. Please try it with the latest version and if the issue still persists, please share your certificate files with us for further investigation at our end.
I tried the latest version of API and as you said, I do not receive the InvalidOperationException anymore while calling client.send(). Encryption seems to be working. But there is another problem when I tried to decrypt as follows: