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
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?
You can change this by setting "emulate cloud security" to "No" in your project settings.
You can find this option by:
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.