• Recommendation/sample how to download/filter and store eMail Attachement

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #49212  by OpaHeinz
 
Hello together

I would like to scan all my eMail Inboxes by filtering the sender and if the mails have an attachment like an invoice.
Also I think, I will need more then one rule to filter the mails.
After that I would like to process the attachment only by OpenKM (Community 6.3.) and set the mail as readed.

In my opinion are two possible way's
a) use an separate process by fetchmail and scripts to store the attachments in a share, which OpenKm will import it later to processing
b) use OpenKm scripting directly
For both I have to start from scratch to understand and implement. :roll:

Out of this:
What would be easier? / are there experience?
Perhaps, has someone a running solution?
Any hints, tips and solutions are welcome!
Thank you in advance :D
rgds
OpaHeinz
 #49232  by jllort
 
First, what kind of email account do you have ? the best scenario for it should be IMAP, do you have IMAP?
Will you use only a single email account, no? and everything what incoming will be invoices etc.. is that the scenario?
 #49240  by OpaHeinz
 
I can access it by IMAP and POP3
I would start with one eMail account, later on a second should be included
I get a lot of different mails and contents, so I need to define filter criteria, from which* mail I have to take the attachments.
* = expect multiple rules, different sender and which keywords/ content.

thank you in advance
rgds
OpaHeinz
 #49245  by jllort
 
1- I suggest always IMAP
2- My second suggestion is not applying any kind of filter from email account, copy all the documents into the same incoming ( one for each email account ).
3- Arrived here you have two options Automation -> process with event-based in Mail creation, or CrontabTask ( I suggest the second, probably you will have fewer problems ).
4- During the email processing you should consider having a log ( for a daily report ) -> what has gone right and what has failed ( move wrong emails to failure folder for manual processing ). You can execute a daily report ( also crontab ) based in the information you have set in a log table ( you may create your own log table for its purpose ).

Some links you should read:
https://docs.openkm.com/kcenter/view/ok ... b-job.html
https://docs.openkm.com/kcenter/view/ok ... ption.html ( Mail and LegacyDAO )

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.