JAVA/CORBA CLASSES
import lotus.domino.*; public class JavaAgent extends AgentBase { public void NotesMain() { try { Session session = getSession(); AgentContext agentContext = session.getAgentContext(); // (Your code goes here) Database db = agentContext.getCurrentDatabase(); db.updateFTIndex(true); DocumentCollection dc = db.FTSearch("arachnid", 15); if (dc.getCount() > 0) { Newsletter news = session.createNewsletter(dc); Document doc; for (int j=0; j<dc.getCount(); j++) { doc = news.formatDocument(db, j+1); doc.appendItemValue("Form", "Memo"); doc.appendItemValue("Subject", "The Arachnid Report " + (j+1)); doc.send(false, session.getUserName()); }} } catch(Exception e) { e.printStackTrace(); } } }
See Also