Page 1 of 1

How to replace JavaMail with Jakarta Mail in OpenKM?

PostPosted:Thu Jan 02, 2025 7:33 am
by Ethan.Yang
Image

I am using this version: https://download.openkm.com/

Hi OpenKM team,

I'm currently facing an issue with mail-1.5.2.jar as it does not support modern Microsoft 365 authentication methods (OAuth2).

To resolve this, I would like to replace JavaMail with Jakarta Mail in OpenKM.
Could you please guide me on the steps required to implement this change? Specifically:

1.Which Jakarta Mail version is compatible with OpenKM?
2.Are there any configurations or dependencies I need to modify for OpenKM to support Jakarta Mail?
3.Will there be any code-level changes required?

Or is there another way for me to use Office 365?
-------------------------------------------------------------------------------
Does jBPM also use mail-1.5.2.jar? Please tell me how to change it.

Re: How to replace JavaMail with Jakarta Mail in OpenKM?

PostPosted:Wed Jan 15, 2025 5:59 pm
by jllort
The jar file is in the tomcat/lib folder, but I think can only updated until version 1.6 ( remove the file into and replace by the new one
https://mvnrepository.com/artifact/com. ... mail/1.6.2 ( download link https://repo1.maven.org/maven2/com/sun/ ... -1.6.2.jar )

Re: How to replace JavaMail with Jakarta Mail in OpenKM?

PostPosted:Thu Jan 16, 2025 6:35 am
by Ethan.Yang
Version 1.6 currently does not support OAuth2.
Does this mean it is currently impossible to use Office 365 with OpenKM?

Re: How to replace JavaMail with Jakarta Mail in OpenKM?

PostPosted:Mon Jan 20, 2025 7:14 am
by jllort
With the CE these are the libraries you can use. You can try to download the code and check if an upper version of the library can be used:

https://github.com/openkm/document-mana ... me-ov-file
or the personal development environment here https://docs.openkm.com/kcenter/view/ok ... nment.html