I’m trying to use the newsletter class in some script I’m writing for an agent … anyone know what is going on with this problem?
NotesException: Notes error: Special database object cannot be located (mail\kdesilva.nsf)
at lotus.domino.local.Newsletter.NformatMsgWithDoclinks(Native Method)
at lotus.domino.local.Newsletter.formatMsgWithDoclinks(Unknown Source)
at JavaAgent.NotesMain(JavaAgent.java:24)
at lotus.domino.AgentBase.runNotes(Unknown Source)
at lotus.domino.NotesThread.run(NotesThread.java:208)
This is the offending code:
if (dc.getCount() > 0) {
Newsletter news = session.createNewsletter(dc);
news.setSubjectItemName("Subject");
news.setDoSubject(true);
Document doc = news.formatMsgWithDoclinks(db);
doc.appendItemValue("Form", "Memo");
doc.appendItemValue("Subject", "Spam Report");
doc.send(false, session.getUserName()); }