Lotus Notes Eclipse Listener for QuerySend() Email Form

Posted on 2013-11-24
Last Modified: 2013-11-29
First of all, I must apologize as I have never developed a notes app that I can remember.  So now I have been asked to create a poor mans security application for a notes platform.  When the user clicks "SEND" in the email form, it should look for keywords that hint of things that should not be sent and pop-up a warning.  It seems the easiest way to do this is to change the form template for QuerySend().  The issue is that I am not the notes admin and we are doing this for only about 2% of the users.  Even if I could update the form template for just those users, it would be subject to changes by the notes admin team (i assume).  I tried to do it with my account and it seemed to change it, but I used the 9.0 template and our back-end is on 8.5 (i think) and this caused unrelated issues.  So then I wondered about the Eclipse plug-in solution.  So I see that I can get a plugin working on 8.5 and "install" it if I remove the "locked-down" (no new plug-ins) client and re-install with a fresh version with "install Applications Features" enabled.  So my questions are this:
Is the template change feasible?
Is the Plug-in Overkill?
If I go with the plug-in, I see lots of information on setting "parameters/properties" etc and adding new buttons to click etc, but very little information on hooking (listening in java-speak) to the various events in the forms.  Particularly I am wondering how to hook to the QuerySend Event (Action?) that is right there in the form.  I really like the fact that this event allows cancelling the email sending right in the subroutine.
I am also wondering where can I find good reference about the extension points provided by notes..I see one called, but it appears to only handle attachment dialog.  
Thanks for your time!
Question by:appliancedude
LVL 11

Accepted Solution

larsberntrop earned 500 total points
ID: 39676827
I think that a plugin would be overkill.
I think the following strategy would be best:

Changes to the standard Mail template should be well planned and thought out, since the template is often updated, and you want the template to be current.
you need to to confer with your Domino admins if this might be for the whole organisation.  And perhaps, there is altready a thirdparty solution in place.  For instance, IBM has Lotus Protector for Mail Security, in which you can apply policoes to both incoming  and outgoing mail, like search for keywords.

If nothing is available, you need to be very careful where you insert your code. Th mail template uses an elaborate Object structure to be able to do all the Mail and Calendaring and Schedule magic.
See if you can put your code in the QuerySaveExtension function in the CoreEmailClasses library.  It's best to make a new copy of the template, give it a new Template name, and apply that template to the mail files needing the change.

AVOID changing the standard template!!!  Changes there can replicate all over the environment causing trouble signed by you, a very career limiting move. If you already have edited the local template on your machine, make a new copy of it (NOT a replica, the new copy needs a new replicaID), and change the template name.
Then delete the edited IBM template and restore an original.

Author Closing Comment

ID: 39686303
Thanks.  I will come back with a follow up shortly on best way to roll-out these changes to only one small group of people.  I edited my own nsf for test and the "message" form works well.  I am however running into what seems to be a famous issue attempting to read the contents of "unsaved" rich text field for replies.  As soon as I get back to it, I was going to try to use the email that is selected in the view  and the one in the forefront to get everything.  Sounds like that might work.  I did spend some time "reading the directions" from an old R6 book I had never cracked the binding on for several years.finally found some use for it!  It has some good foundation stuff even though we are on 8.5 now.

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Android development question 2 54
Glassfish admin console not working 1 33
Html Table Looping (part 2) 5 27
asp Google Map 2 32
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question