Contact Information

Chris Toohey

Like what you see? Help feed-the-beast by donating to the site and it's humbly thankful author!

My Twitpic Updates
    Site Resources

    RSS Site Content
    Syndicate This Site!
    DG Banner Logo
    Advertisements

    IBM Lotus Notes and Domino 7 now available

    Zephyr v0.1 - Configuration-based Rich Text Mail Merge and Emailing Utility

    08/21/2008 02:56:42 PM | Chris Toohey | Bethlehem, PA

    I've been cheating. When I have an application that requires some form of automated emailing, chock full of doclinks, formatting rich text, and other mind-numbing exercises in what will eventually leave to hair-pulling and teeth-gnashing... I cheat. See, I won't write on-the-fly emails in an application - aside from being a PITA to get juuuuuuuust right, 2 days after the application is implemented you're getting calls from the project champion asking for tweaks.

    I'd rather avoid those calls, and give them the rod and bait that allows them to fish for themselves... if you follow me.

    So - very much in-line with my Excel Export utility, I don't create an email on-the-fly, but rather take a configurable Email Template, do the required Mail Merging, and simply send that email on it's way. While it is generated on-the-fly so to speak, it's not as if I have to build everything from scratch.

    Okay - enough small talk - we're here to get you this utility application, so you don't have to wrangle Rich Text or settle on simple Plain Text-based, workflow-driven notifications. It's with that, that I present Zephyr!

    So... what exactly does Zephyr do?

    Well, let's say you have a Helpdesk database where you wish to send out context-sensitive notifications when select tickets are closed. You can create a simple agent that - to make this simple - takes the contents of the source NotesDocument (sdoc), and copy them to a new NotesDocument (jdoc) in Zephyr which we'll call a Job Document. ( In fact, we actually need to change the Form NotesItem to "jobdocument" in order for it to work in Zephyr!)

    Once we have our jdoc in Zephyr, we take a look at the Email Templates (edoc) within Zephyr. Each Active edoc contains a searchcriteria NotesItem, which is evaluated at runtime against a NotesView containing all of our jdocs, checking for an @True-match. When found, we simply write a new NotesDocument (memo) to the Server (where Zephyr currently resides - even works on Local!) mail.box, evaluate pseudo-Mail Merges against the edoc, and copy all needed items into the memo.

    For some added goodness, we update the jdoc with a stamp that tells us that the given edoc has evaluated and ran against said jdoc. If you never wish to process that same jdoc again, simply add that condition to the edoc's searchcriteria NotesItem.

    The From/Principal, SendTo, CopyTo, BlindCopyTo, ReplyTo, Subject, and even the Body NotesItems of the edoc are Mail Merge-friendly, allowing you to completely control the generated email!

    Zephyr v0.1 - Configuration-based Rich Text Mail Merge and Emailing Utility - Download

    So, if you use this application, all you'll need to do is use the typical Rich Text editor to define what your email should contain (including Embedded Single Category Views, placeholders for DocLinks, Computed Text, Attachments, etc.), the Job Document criteria specifying which jdocs the Email Template should run against, and - lastly - externally deposite whichever documents you wish to trigger such Rich Email Notifications against!

    In this release, you'll see a UI-accessible Agent called New Example Job Document. This Agent creates a simple Job Document - which when used in combination with the example Email Template, will send me a simple email! Also - the Notifications Agent is scheduled to run every 5 minutes (decrease that!), and is currently disabled. You can manually run the Notifications Agent to test the utility - which I hope makes your life as easy as it's made mine!


    Like what you see? Help feed-the-beast by donating to the site and it's humbly thankful author!

    Comments

    Lissette
    08/26/2008 01:54:10 AM

    This is neat, however, a little help with where to define the merge fields. I see where and are in the email template, but where are the values pulled from? Is there a profile doc where you enter that information? or is that the Excel spreadsheet you referred to?

    Thanks, in advance, for the information. This is great!



    Add a New Comment


    (Not Published/Public)
    Remember my Information!

    (Enter the text from the image to proceed)

    (Full markup allowed in the comment field below; play nice!)

    Live Comments Preview