How to hook 'send email' of IBM Lotus Notes -


i'm working on plugin ibm lotus notes. need change content of email right after user clicks 'send email' button, before email sent. have searched apis of lotus notes can't find workaround. there library named com.ibm.notes.mailsend in folder /opt/ibm/lotus/notes/framework/shared/eclipse/plugins. can't find document related on internet, , have no idea how capture event sending email. know how implement function need? thanks.

update: richard. i've figured out how hook email sending. need make option user can set differently each individual email. understanding, email known message stored in mail file database before being sent. how 'add flag' message? thanks.

the way hook events in lotus notes notes c api's extension manager routines. general strategy hooking mail send operations set hook on em_nsfnoteupdatemailbox. can done on either notes client or domino server. on server side, if processing non-trivial, run risk of slowing down domino if try of work in hook, strategy people adopt have hook code change status of message "on hold" , signal separate server task take on work. way hook can return , separate server task can take whatever time needed before resetting status of message normal routing take over. can find documentation here.

for server-side processing only, there 2 options allow write code in java instead of c. 1 openntf project called triggerhappy allows write java agents fired when boilerplate hook code triggered, , other openntf version of domino osgi tasklet service (aka dots), allows taskets fired in response em events. note there ibm-supported version of dots shipped in domino 9 "social edition", understanding not include em event support.

updated additional info requested...

in order add flag each message can read code runs in hook, need modify mail template used in users' mail files. need permission domino system administrators this, , blunt: not domino adminisrators because makes job more difficult when upgrading domino versions. there many ways modify template, point of of them add new hidden field messages serve flag hook code. if field exists, code changes content need, otherwise leave content alone. 1 possible way adding shared action containing formula set hidden field (that formula field myflagfieldname := "1";) , can add shared action memo form. users press action button time want trigger code. admin need maintain backup database containing shared action , re-add mail template after every upgrade , re-add new template version's memo form. of course there other ways well, more friendly users harder admins deal with, , vice versa.


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -