I'd like to see if it is possible to add a mail search feature. Having multiple folders with many messages in each, it is helpful to be able to search for messages containing certain string in From, Subject, and body fields. Thanks Chinh.
I'm trying to develop this feature, but after taking a look to the code, I have a question:
After getting the searched messages in a messages array I do session.redirectToActual() for refreshing the list of messages and show only these messages, but if I do that, embedded_messagelist.jsp calls its folder.listMessageInfos() which returns all the messages in the folder.
What I don't understand is why. I explain what I do:
1. After pushing search button in embedded_messagelist.jsp, doSearchMessages in controller servlet is called.
2.This method calls another new method (X method) in Folder class.
3. X method calls Y method in JwmaMessageInfoListImpl class. This method constructs an array of messages (msgs) matching the pattern and calls buildMessageInfoList(msgs) which fills m_MessageInfos.
So far the list is correct.
4.After the methods are called, doSearchMessages has the session.redirectToActual() sentence.
What i dont understand is why when embedded_messagelist.jsp calls its folder.listMessageInfos() it returns all the messages in the folder, if m_MessageInfos has filled previously with the list of messages searched.
I don't have strong knowledge of java/servlets/jsp so, maybe I'm missing something trivial. Sorry for that. I'm only trying...
Any idea of how to solve the issue?
Thank you very much
After my long mail, forgot the question. I found out why.
I think I have a first draft version of searchin messages. I would like to improve it because now gor example the button for searching is in the folder, so you search and you search in that folder.
But anyway I have a question: when you search a message for example like this:
- From: john
- Subject: holidays
- Body: empty (nothing written)
In this case, should you see only those messages with From field= John AND Subject field= holidays?
Or should you see those messages with From field= John and Subject field= whatever OR From field= whatever and Subject field= holidays OR From field= John and Subject field= holidays?
Which code base are you using to develop this in? Have you checked out webmail or jwma-scratch from CVS?
Are you interested in sharing your code and contributing it to Jwma?
Would you join the developer mailing list and bring up your development there? I'm not sure how many of the people interested in Jwma development read this forum. Here's the mailing list:
Personally, I think searching within the folder one is in is fine, but there should be a discussion of this.
I don't completely understand your question above. Do you have logical operators (AND, OR)? What is the user searching for?
Thanks for your work,
Ok, I posted to the developer mailing list.
Anyway, I answer your questions:
As I understand, the user uses Search engine for searching those mails matching a specified pattern. This pattern is built basing on the words the user specified in From, Subject and Body text-fields. With this, javax.mail.search provide a mechanism to search with OR, AND... logical operators...
We continue in developer mailing list...
I send a mail to email@example.com to post to the developer mailing list, but no message appears in the list...
Do I have to do anything else?
Please go to
and subscribe to the list.
Yes, I already suscribed and I received a mail for confirming this subscription. I reply to this mail and after that, I senf my first mail to the list, but it doesn't appear..
I don't have access to the mailman list admin, so I can't tell if you're on the list. Try going to the mailman page,
and accessing your settings page, using the input at the bottom of the page (type in your email address that you subscribed with). See if you can change a setting using your password. It should tell you if you don't have an account or your password is wrong.
If you have an account, and mail is not being sent, I think the SourceForge people will need to investigate. Check out their support documentation at
You may need to create a support request from them.
I tried the mailman page, but it wasn't succesful. When I enter my email address, it says that that address has not not subscription to jwma-devel, so finally I created a support request.
I'm waiting the answer..
I am the administrator of the mailing list. Probably you could contact me directly, so I take a look at what Mailman has done with your subscription (I'll need the mail address you are using though).