One nice feature that’s been in Notes since Notes 4 is the ability to create a newsletter agent using simple actions.
You can set up the newsletter agent to go against all documents in a categorized view. The simple action will automatically break with each category found. You can dynamically determine the recipients (To, CC, BCC), the Subject and the Body using formula code.
This is all well and good. Its a nice and easy way for end users to create newsletters without knowing how to code. However, since the newsletter agent is driven by simple actions, there isn’t a way to handle errors that may arise when the agent runs. For example, one of my clients had several agents that were set up to send newsletters to the people included in a field in each document. The agent generated errors when one of the recipients was no longer in the address book.
I’d like to rewrite the agent so that it can properly handle errors, namely logging them for follow-up and e-mailing the database owner about the errors. There is a NotesNewsletter class available in LotusScript, but it doesn’t create the same newsletter that the simple action does.
For example, here’s the simple action newsletter driven off of a categorized view:
And here’s the Lotusscript equivalent:
The problem with the Lotusscript newsletter class is it doesn’t use the view columns associated with the document. It only includes the doclink and the field you define as the subject or title within the document.
What I would like to do is rewrite the simple action newsletters as Lotusscript newsletters. To duplicate the table header and tabbed spacing used by the newsletter simple action would require me to create a rich text table. I can do that, but I was wondering if someone has already done this. Has anyone heard of an open source solution for this?