Re: Capture IMAP events for use in our CRM

2012-02-01 Thread Eric Charles
Hi, Glad to see it's working and congrats for your imagination. For your suggestion on the system session, would you mind opening a JIRA for this ? (https://issues.apache.org/jira/browse/IMAP) Thx, Eric On 31/01/12 09:53, lclhst wrote: Thank you for your helpful posts, Eric. It really

Re: Capture IMAP events for use in our CRM

2012-01-31 Thread lclhst
Thank you for your helpful posts, Eric. It really helped me figure some things out. So here's what I'm going to do: Create 2 beans: - SyncToCrmBean - SyncFromCrmBean SyncToCrmBean: - Registers a global mailbox listener, so it receives all the events related to the modification of any message -

Re: Capture IMAP events for use in our CRM

2012-01-30 Thread lclhst
Does anybody have any input to this? I'm now creating my CustomMailboxListener with a 1 parameter constructor, which is the MailboxManager, so I can access the mailboxes. Not sure on the questions I asked before yet, though. On Fri, Jan 27, 2012 at 6:05 PM, lclhst l0c4lh0st.d...@gmail.com

Re: Capture IMAP events for use in our CRM

2012-01-30 Thread Dhrubo
Can we use something like an integration pack for example Spring integration which has spring imap support? But offcourse event is required. On Mon, Jan 30, 2012 at 2:08 PM, lclhst l0c4lh0st.d...@gmail.com wrote: Does anybody have any input to this? I'm now creating my CustomMailboxListener

Re: Capture IMAP events for use in our CRM

2012-01-30 Thread Eric Charles
Hi, See comments inside, Eric On 27/01/12 18:05, lclhst wrote: Ok, I have been playing around a bit with this. I added the listener through the Spring XML files and now I receive the events in my listener. It's working great. When event.getSession().getType().equals(SessionType.System), the

Re: Capture IMAP events for use in our CRM

2012-01-30 Thread Eric Charles
I don't know much from spring integration, but it will probably not fit our existing event system. On 30/01/12 10:14, Dhrubo wrote: Can we use something like an integration pack for example Spring integration which has spring imap support? But offcourse event is required. On Mon, Jan 30, 2012

Re: Capture IMAP events for use in our CRM

2012-01-30 Thread lclhst
Thank you for the useful replies. Ok, creating a reference to the mailboxmanager using @Resource is a lot better. So that's nice. Regarding the hostname, I was looking for a way to detect wether this session is a user-session (i.e. an actual user that reads a message in his IMAP-inbox) or a

Re: Capture IMAP events for use in our CRM

2012-01-30 Thread Eric Charles
So your CRM acts as an IMAP client, right and ? If such, you could assign a username/password to your CRM. The event contains the MailboSession which has the getUser().getUsername(), so you will know if the event has been triggered by the CRM or by a real user. Did I get your point? Eric On

Re: Capture IMAP events for use in our CRM

2012-01-30 Thread Eric Charles
Not sure to get your use case: has the CRM the end-user credentials? If yes and if it reuses it, the event has not the knowledge of the imaprequest - maybe we should add it? If no, the ACL which has just been committed could be a solution (assuming the enduser allows the CRM to access its

Re: Capture IMAP events for use in our CRM

2012-01-30 Thread lclhst
Hi, yes and no. :) For now, we have our CRM as an e-mail client. And we have a custom e-mail server, which is FAR from RFC-compliant. :) That's why we want to switch to a real mailserver and we're going to use Apache JAMES for this. However, we cannot make such a big step at once, so what we

Re: Capture IMAP events for use in our CRM

2012-01-30 Thread Eric Charles
Thx a lot for sharing this. (forget my last post, it has being crossing the more detailed information you give here). I will further reply tomorrow (short on time here), but smooth migration to james sounds indeed very exciting :) Eric On 30/01/12 17:31, lclhst wrote: Hi, yes and no. :)

Re: Capture IMAP events for use in our CRM

2012-01-27 Thread lclhst
Ok, I have been playing around a bit with this. I added the listener through the Spring XML files and now I receive the events in my listener. It's working great. When event.getSession().getType().equals(SessionType.System), the e-mail is being handled/received/modified through SMTP, right?

Capture IMAP events for use in our CRM

2012-01-26 Thread l0c4l h0st
Hello, What I'm trying to do is capture events that the IMAP-server should (or is supposed to) raise. Whenever a message gets marked as read, I want to get a notification of this event. Whenever a message gets marked as unread, I want to get a notification of this event. Whenever a message gets

Re: Capture IMAP events for use in our CRM

2012-01-26 Thread lclhst
Hello Norman, Thanks, yes I found some references to this MailboxListener class, but I could not find where to register the event listener. Can I do this from within a mailet? Or what would be the best way to do this? I wasn't planning to modify the entire JAMES code, but would rather like to

Re: Capture IMAP events for use in our CRM

2012-01-26 Thread Norman Maurer
Hi there, you would just write a MailboxListener implementation and then add it to the MailboxManager via the addGlobalMailboxListener(..) method. Adding the listener could be done directly in the spring context xml files. This listener will then get notifications for each events that are related

Re: Capture IMAP events for use in our CRM

2012-01-26 Thread Dhrubo
Appreciated Norman. ~Danke On Thu, Jan 26, 2012 at 9:26 PM, Norman Maurer norman.mau...@googlemail.com wrote: Hi there, you can register a MailboxListener in the MailboxManager instance and so get notifications about mailbox events. This should do the job. Have a look here: