Hello,
I wondered if it is possible to say via code in which folder I want to interact. I mean, I need for example to use getMessageCount() method for different folders, but when I'm in a generic page. This is to have a list with the folders showing the messages each folder has in such way that if you click in one of them you are redirected to it.
Is it possible to say something like
JwmaFolder folder=(JwmaFolder) session.getValue("SentMailFolder") ??
And with this folder object, use all its methods like i was inside sent-mail folder?
Thanks in advance
Regards,
Miriam
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, first of all note that the message count retrieved for a closed folder can be an expensive operation IMAP wise, this is the main reason why it isn't done automatically so far.
Second, I would suggest that you do this in the controller or model part and not in the view, except you do not care about MVC separation.
Third, you should probably try to use the JwmaStoreImpl instance (you can cast it), where you should have access to pretty much any folder you wish to work with.
You might however, simply do activate online counting for all subfolders, so this would give you the chance to retrieve it from the cached subfolder list without problems (i.e. <JwmaFolder>.listSubfolders(), on any of these use getMessageCount(); if it's flagged as online counting, it will use the MailApi directly to retrieve the count). This change should be in
JwmaFolderImpl
public static JwmaFolderImpl createLight(Folder folder)
making sure that any such instance created is flagged with online counting:
jwmafolder.setOnlineCounting(true);
Hope that helps,
Dieter
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The "OUTBOX" is the sent mail folder that can be configured in the user preferences. The site_template.xml has the purpose of allowing the admin to give it a default name, but the user might still chose to change it (I think in Expert mode though).
Sent mail will be automatically stored in this folder if the user configured this.
Regards,
Dieter
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
Again a question about Outbox folder...
I refered Outbox folder like for example in Outlook, this folder where messages are stored before they are sent. Once they are sent, they are stored in Sent mail folder.
Is it posible to configure in any way?
Thanks in advance
Miriam
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
But for me Sent-mail folder is not the same as Outbox folder because suppose that you send a mail but due to problems with server (for example server is down), the message is not send. This message should be stored in Outbox folder. Once the server is ok, this message automatically is sent, then Outbox folder empties and the message is stored in Sent-mail folder.
Outlook has two different folders, one for sent mails and another one for the outbox folder.
Usually Outbox folder is empty because just the message is sent correctly this folder is empty...
Thanks in advance
Miriam
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
One more thing, I'm the person who has the problem in jwma-devel list (I had developed a first draft of search feature) because I'm not still able to send mails to the list, however now I can login to mailman page and change my settings, so what is the problem? I still want to contribute :)
Thanks,
Rgds,
Miriam
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I wondered if it is possible to say via code in which folder I want to interact. I mean, I need for example to use getMessageCount() method for different folders, but when I'm in a generic page. This is to have a list with the folders showing the messages each folder has in such way that if you click in one of them you are redirected to it.
Is it possible to say something like
JwmaFolder folder=(JwmaFolder) session.getValue("SentMailFolder") ??
And with this folder object, use all its methods like i was inside sent-mail folder?
Thanks in advance
Regards,
Miriam
Miriam,
Well, first of all note that the message count retrieved for a closed folder can be an expensive operation IMAP wise, this is the main reason why it isn't done automatically so far.
Second, I would suggest that you do this in the controller or model part and not in the view, except you do not care about MVC separation.
Third, you should probably try to use the JwmaStoreImpl instance (you can cast it), where you should have access to pretty much any folder you wish to work with.
You might however, simply do activate online counting for all subfolders, so this would give you the chance to retrieve it from the cached subfolder list without problems (i.e. <JwmaFolder>.listSubfolders(), on any of these use getMessageCount(); if it's flagged as online counting, it will use the MailApi directly to retrieve the count). This change should be in
JwmaFolderImpl
public static JwmaFolderImpl createLight(Folder folder)
making sure that any such instance created is flagged with online counting:
jwmafolder.setOnlineCounting(true);
Hope that helps,
Dieter
Hello,
Thank you very much. I solved the problem :)
Finally I use JwmaStoreImpl instance.
Another thing, what about outbox folder? Does it exists? I say this because in site_template.xml file, I don' t see it. Is it possible add it?
Thanks again,
Miriam
Miriam,
The "OUTBOX" is the sent mail folder that can be configured in the user preferences. The site_template.xml has the purpose of allowing the admin to give it a default name, but the user might still chose to change it (I think in Expert mode though).
Sent mail will be automatically stored in this folder if the user configured this.
Regards,
Dieter
Hello,
Again a question about Outbox folder...
I refered Outbox folder like for example in Outlook, this folder where messages are stored before they are sent. Once they are sent, they are stored in Sent mail folder.
Is it posible to configure in any way?
Thanks in advance
Miriam
Miriam,
Yes, that's the sent-mail folder, that can be configured in the user preferences (or the site-template.xml for the admin).
It requires the folder to be set correctly and the mechanism to be activated.
These settings are available in expert mode if I remember correctly.
Regards,
Dieter
Hello,
But for me Sent-mail folder is not the same as Outbox folder because suppose that you send a mail but due to problems with server (for example server is down), the message is not send. This message should be stored in Outbox folder. Once the server is ok, this message automatically is sent, then Outbox folder empties and the message is stored in Sent-mail folder.
Outlook has two different folders, one for sent mails and another one for the outbox folder.
Usually Outbox folder is empty because just the message is sent correctly this folder is empty...
Thanks in advance
Miriam
Hello,
OK, thank you very much.
One more thing, I'm the person who has the problem in jwma-devel list (I had developed a first draft of search feature) because I'm not still able to send mails to the list, however now I can login to mailman page and change my settings, so what is the problem? I still want to contribute :)
Thanks,
Rgds,
Miriam
I know, and I am sad to hear this. Support seems to have closed the issue after I subscribed you manually.
Could you try registering another eMail address?
Regards,
Dieter