I have an XPage with a view control. On that view control, I have a checkbox selection so that one or more documents can be selected. On the same view control, there is a button. Under the button, I call SSJS that creates a document and saves the newly created document, and then renders the newly created to the user view an XPage. (not sure this matters, but the newly created document is a mail message with Subject, SendTo, CopyTo, From, Form, etc). On the newly saved document, there is then another button that calls a lotuscript agent via the following:
document1.save();
var id = document1.getDocument().getNoteID();
var agent = database.getAgent("(SendMemo)");
agent.run(id)
(SendMemo) is very simple , with the following code:
on error goto errorlog
dim s as new notessession
set db = session.currentdatabase
dim agent as NotesAgent
set agent = session.CurrentAgent
dim UNID as string
UNID= agent.ParameterDocID;
dim mydoc as notesdocument
set mydoc = db.getDocumentByID(UNID)
mydoc.sendDaily= "No"
call mydoc.ConvertToMIME(2)
Call mydoc.save ( true, false)
call mydoc.send(False) ****************
Exit sub
errorlog:
.....
end sub
If no changes are made to the mail message, it mails correctly without issue. If however, any text is altered, the agent does not finish (fails at *****) and the error is
"Notes error: The Cryptographic key was not found"
I have tried the following variations:
call mydoc.send ( true)
call mydoc.send ( false, recipient)
ANY ideas?? I don't have encryption turned on for my mail file. The only thing that I see is " Sign messages that I send" but that is checked but grayed out so cannot change.