Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass "SearchTerms" to do the searching of imap email folders on the email server. #103

Closed
ronankeane opened this issue Sep 7, 2016 · 5 comments

Comments

@ronankeane
Copy link

Ensuing from issue #97, it would be great to have the option to pass "searchTerms" to do the searching of imap email folders on the email server, without downloading to the client for processing by EMECAs. (In my case, I would be most interested in being able to pass a date search term). Thanks.

@jonesde
Copy link
Member

jonesde commented Sep 7, 2016

The subject for this issue seems to differ from the description... would it be better to have something where calling code handle MimeMessage objects directly (ie don't go through EMECA rules), or to allow search terms somewhere... perhaps in the pollEmailServer service or perhaps even the EmailServer entity for all polling/etc on that server?

@ronankeane
Copy link
Author

ronankeane commented Sep 7, 2016

What I meant was the 'SearchTerm' functionality. I understood this as effectively running the existing EMECA type functionality (at least the 'condition' element) directly on server instead of on the client, where it would similarly process each message. But I see now that it probably does not have to do this to 'search' on the server. I will edit the issue subject.

The difficulty I would see with use of the EmailServer entity is in having 'dynamic' search terms. As a simple example, if you only wanted to look at emails for the past two days.

So, I would be thinking along lines of passing SearchTerm parameters through in a pollEmail service, perhaps a separate one to use as an alternative to the one that implements the EMECA functionality? Or combined? Certainly the EMECA process is useful and powerful.

@ronankeane ronankeane changed the title Process MimeMessage objects directly (feature request) Pass "searchTerms" to do the searching of imap email folders on the email server. Sep 7, 2016
@ronankeane ronankeane changed the title Pass "searchTerms" to do the searching of imap email folders on the email server. Pass "SearchTerms" to do the searching of imap email folders on the email server. Sep 7, 2016
@ronankeane ronankeane reopened this Sep 7, 2016
@jonesde
Copy link
Member

jonesde commented Sep 8, 2016

The pollEmailServer service is designed to run in the background using settings on the EmailServer entity and perhaps parameters set in the service job that runs it on a schedule. In other words, it is not so much meant to be manually triggered where you would explicitly pass some sort of parameter based on what you want in a moment.

This is why any search terms in addition to the default ones it uses now would have to be configured somewhere.

What sort of overall process do you have in mind for more 'dynamic' search terms?

@ronankeane
Copy link
Author

ronankeane commented Sep 8, 2016

The kind of process I have in mind would be along the line that you could have another scheduled service** that calls the poll#EmailServer service sending it the required parameters.

For example,

  • Your bespoke service could search for all current, active users in a particular usergroup for their emailServerIds and iterate the poll#EmailServer service with the appropriate emailServerIds.
  • Pass in whether to poll their Inbox, Sent Folder, or any other particular folder that they require to be managed. One example off the top of my head would be you might write a service to query a 'sales' folder containing only website enquiry forms that could be parsed with groovy to extract data etc.
  • Pass in the date range of emails to retrieve. For an 'archiving' type application for CRM you might only check emails once every night. So say, last two days calculated from today's date (to account for emails that might have got delayed and so on).
  • Pass in instruction to search on something contained in the subject, for example off the top of my head, a latest project set up, with a project number that is referenced in the email subjects (this reference number might be generated from the new workEffortId, say)

And so on. -- If there is a core poll#EmailServer service that can accept a range of parameters as to how and what it should poll, I think one could use it much more flexibly.

** Or more than one for that matter...

@jonesde
Copy link
Member

jonesde commented Jan 17, 2018

Closing as part of general cleanup for the move to HiveMind and for no recent activity on this issue. If this comes up again or anyone wants to pursue it feel free to create a request on moqui.org. For more information see:

https://www.moqui.org/m/docs/moqui/Community+Guide

@jonesde jonesde closed this as completed Jan 17, 2018
acetousk pushed a commit that referenced this issue Jan 10, 2024
…lso fixed issue in EditDbView, hasn't been updated and used an old EntityFacade method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants