Send Encrypted emails via LEI/Lotus Script

Hello, I have to write a script to send encrypted emails to users in same domain. I have tried everything in designer help. When I send email via below code, it does sets the encrypt flag to “1” and also shows that email is encrypted in Inbox. However, everyone is able to read it and not just the person listed in ‘SendTo’ field.

Could someone let me know if I am doing something wrong.

Code

==========================

Dim session As New NotesSession

Dim Encryptitem As Notesitem

Dim db As NotesDatabase

Dim doc As NotesDocument

Dim rtitem As NotesRichTextItem

Set db = session.CurrentDatabase

Set doc = New NotesDocument( db )

doc.Form = “Memo”

doc.SendTo = “ABC”

doc.CopyTo = "EFG "

'…set value of doc…

Set rtitem = New NotesRichTextItem ( doc, “Body” )

Call rtitem.AppendText ( “Email txt”)

doc.Subject = “Here’s the document you wanted”

Set Encryptitem = New NotesItem ( Doc, “Encrypt”, “1” )

Encryptitem.IsSummary = True

doc.EncryptOnSend = True

Call doc.Send( False )

============================

Subject: Send Encrypted emails via LEI/Lotus Script

Where is the code running, on Server or from a client?

If it is running from server it is using the servers key, which is available to all users withing the domain.

Subject: RE: Send Encrypted emails via LEI/Lotus Script

The code is running from client. Its a agent which will be triggered by a Action button. Let me know if you need any further help.

Subject: RE: Send Encrypted emails via LEI/Lotus Script

A quick question though…what if I have to send emails via LEI job which is running on LEI server. How can I encrypt such emails. Thanks for your help.