Page 1 of 1

Email Rename Not working CE-V6.3.9

PostPosted:Thu Jun 18, 2020 3:09 pm
by aamgad@planet.com.eg
Hello,
I have been trying to rename emails on my file explorer and in my openkm. The mail path is modified to the new name but the displayed name is not changed. For example if the original name is /okm:root/Media/test.msg and i renamed it to /okm:root/Media/trial2.msg the path is changed, but the display name is still "test" and not changed to "trial2".
Thanks in advance :D

Re: Email Rename Not working CE-V6.3.9

PostPosted:Sun Jun 21, 2020 9:14 am
by jllort
That's because really it is not showing the folder name where the e-mail it is stored, it is showing the "subject" of the e-mail and it is not allowed to rename the subject of an email. I think this feature should be disabled - rename - from the UI, because has no sense to rename the subject of an email.

Re: Email Rename Not working CE-V6.3.9

PostPosted:Mon Jun 22, 2020 10:18 pm
by aamgad@planet.com.eg
Hello Dear,
Thank you very much for your reply.
Is there any way to show an alternative name for the file other than the subject. The scenario is as follows, we have a set emails that are uploaded sequentially and i want to add a prefix index number to facilitate the ordering of the data as the menu tracks only the updated date not the created date. How can i achieve such thing ?

Re: Email Rename Not working CE-V6.3.9

PostPosted:Fri Jun 26, 2020 2:01 pm
by jllort
Maybe modifying the subject with the number at the beginning. You can do it with automation in pre-stage.
Currently built in automation -> https://docs.openkm.com/kcenter/view/ok ... ugins.html ( in your case you need to create your own )

Create your own automation action ( to updated the subject ) ->
https://docs.openkm.com/kcenter/view/ok ... ction.html

Link the automation to "mail_create" event

You must modifiy the class BaseMailModule.java -> method create
https://github.com/openkm/document-mana ... odule.java

to pass the variable MAIL_SUBJECT in the env variables -> to be replaced by action -> and then get again from ENV variables and set the new subject.

Just copy the jar file in the plugins folder ( it is in tomcat folder ) and you will be able to use the new action.

Finally, I suggest download the openkm personal development environment, more information at https://www.openkm.com/en/download.html ( take a look at the video ) -> it comes as VM with everything into ready to be used.