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 10

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
A short article about a problem I had getting the GPS LocationListener working.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

910 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now