Page 1 of 1

Attachment of email body

PostPosted:Wed Aug 14, 2024 5:00 pm
by MarcoOliveira
Its possible receive one email and separate attachment of email body?

Or add one button "move" and at same time add a button in this screen?
Like "Document move"
https://prnt.sc/RvhNLL4bB2-L

https://prnt.sc/t6O1gyXAI2YU

Re: Attachment of email body

PostPosted:Mon Aug 19, 2024 4:52 pm
by jllort
Yes, the idea will be intercept the event on document creation ( because attachments are managed as regular documents in the OpenKM ). Check if the parent is a node of type Mail -> you should use the isValid method -> https://docs.openkm.com/kcenter/view/ok ... ml#isValid

In the NodeDocument ( or Document ) has a method to get the parent ( the UUID of the parent ) -> that's what you must evaluate.

I do not suggest moving the document, maybe it is better to copy it. It depends on what you wish to do ( keep the email or delete at the end )

Re: Attachment of email body

PostPosted:Tue Aug 20, 2024 11:08 am
by MarcoOliveira
Perfect! It's working very wel. Can i share my code?

Re: Attachment of email body

PostPosted:Thu Sep 26, 2024 6:57 am
by jllort
Yes, code is always welcome and may help other users. You can share here.