Can i use third party Java APIs with Mendix?

0
I wanna use the Java mail API with my code, but i don't know it it's possible, and if so, how?
asked
3 answers
2

Yes, you can use Java code in your Mendix applications. You can create a java action and provide your own java implementation.

Please check the following info: https://docs.mendix.com/refguide7/java-actions

Also check the connector kit info on how to create easy to use java actions that will show in your toolbox: https://www.mendix.com/blog/introducing-mendix-connector-kit/

However, if you are only interested in mail functionality, the appstore contains a number of module that provide you with mail functionality so you don't have to code this yourself. Please check the following doc: https://docs.mendix.com/howtogeneral/mendixcloud/sending-email

answered
1

Thanks for your reply.

I do wanna test some things with JavaMail, but whenever i try to execute code i get an error:

Caused by: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "*" "read,write")

I searched the internet for answers and people say that a security policy is preventing the reading of a file, I'm guessing it's the JavaMail file. And they say it's fixable by editing a file called server.policy

Can you help me with this?

answered
1

You can change this by setting "emulate cloud security" to "No" in your project settings.

 

You can find this option by:

  • opening "settings" in your project structure,
  • then select the configuration that you use,
  • then open the "Server" tab.

 

This does not make your app less secure. It was used in older versions of the cloud to limit access of mendix applications to system functionality. It is no longer needed in free environments or the latest versions of our production cloud.

answered