I have send an Encrypted email to Lotus notes in-box, If I access that email from my local Its giving true, If the same email is running different system Its giving false.
Is it setting issue?
My code look like
logger.debug(“This Email is encrypted? “+document.isEncrypted());
my Local logger is printing
“This Email is encrypted? true”
If i run the same email form some other system its printing
“This Email is encrypted? false”
This is the document properties.
Field Name: Encrypt.
Data Type: Text
Data Length: 1 bytes
Seq Num: 1
Dup Item ID: 0
Field Flags: SUMMARY
“1”
I don’t know My code is behaving differently in different places.
Thanks for the help.
The isEncrypted() property is not related to the Encrypt field. That field is just a UI switch. The isEncrypted() property is based on the $Seal item, or on SMIME content if the message is in MIME format.
There are two questions that are probably related to what you are seeing:
If you open an encrypted message in the Notes API, and your current Notes ID file contains the correct private key to decrypt the message, then the message is automatically decrypted. This happens in a layer down below the LotusScrpt and Java APIs, so these APIs see that the document is not encrypted and return false. But apparently IBM changed this in version 8.5.2. Here’s a link that reports that in 8.5.2 the isEncrypted() will return true. It seems that IBM has fixed the code so that it now knows the right answer even though the automatic decryption was already done.
And of course, if you open an encrypted message in the Notes API using a Notes ID file that doesn’t contain the correct private key to decrypt the message, IsEncrypted() will always return true.