hello everybody!
i want to build a server task which will intercept mail before it reaches mail.box…but i don’t know where to start
any ideas?
thank you in advance
hello everybody!
i want to build a server task which will intercept mail before it reaches mail.box…but i don’t know where to start
any ideas?
thank you in advance
Subject: intercepting mail
If you could elaborate on the purpose of the interception, we might be able help you a bit further ?
Henrik
Subject: RE: intercepting mail
Yes, depending on what you mean to do, there are several possibilities, including pre-delivery agents and server-based mail rules which might accomplish whatever it is that you want. So elaborate.
Subject: intercepting mail
AFAIK, you will have to use a 3rd party tool for this.
Gregg
Subject: RE: intercepting mail
yes, i will probably use the c/c++ api…
but i still dont’ know where to start…
Subject: intercepting mail
download the c api (server add-in) or c++ api (everything else), depends on what you want to do/write
download ms visual studio 2005 beta x (it’s free) - or something equivalent if you don’t have windows
look at the api samples
look in the api help (you will need that all the time) for the EM_NSFNOTEUPDATEMAILBOX em hook (you want the BEFORE action), it’s what you need to trap any message before it’s saved/updated in a mailbox typed database (db properties, not just mail.box)
if you want to trap SMTP messages you need the EM_SMTP* hooks - anything you write for this MUST be multi-threaded (because the smtp task can, and does, pass a single incoming message around multiple worker threads during a session) and you’ll probably also require some sort of thread local storage (or it’s equivalent). don’t try using globals for this or it’ll never work properly under load.
i haven’t seen the server task do this with notes messages so if you only want to play with notes then you could probably get away with globals but i’d advise you not to go that way.
it’s not easy at first but once you understand how the whole thing works you’ll be ok
Subject: RE: intercepting mail
i have the 3.0 c++ api…but i can’t find in help any references to the EM_NSFNOTEUPDATEMAILBOX…should look for them somewhere elese?
Subject: RE: intercepting mail
download the C API, it has a notes help db with all the EM hooks in it