Camunda-bpm-mail extension with multiple configurations



I’m trying to use the camunda-bpm-mail extension developed by the community

my file is located inside /src/main/resources which is the normal location for such files. the documentation indicates that unless we want to place file somewhere else (e.g. $CATALINA_HOME/conf/ ) then we must set an environment variable MAIL_CONFIG for the connector to work. when I don’t copy the file to tomcat config folder I get the error no config file found in class path

java.lang.IllegalStateException: Cannot find mail configuration at: classpath:/

which makes no sense, since my is inside the default folder location “/src/main/resources”. I managed to get the connector to work when I copy to tomcat config folder and setting MAIL_CONFIG but that’s not what I want. because maybe different processes may use different mail-server configurations, placing the mail-config file in tomcat config folder and setting an environment will limit the connector to only one configuration.

any idea what might be wrong? is there someone who managed to get the connector to work with the default setup ?


Do you include the mail connector as a library in your application or as a shared library in Tomcat?


I added it as a dependency in my application but I copied the jar file “camunda-bpm-mail-core.jar” to the tomact /lib/ folder.


Hi @hassank,

currently, the mail configuration applies globally to all processes of the process engine. You can’t have different configurations. However, this could be a good improvement.

Best regards,


Hello @Philipp_Ossler

I’m having this exception:

Caused by: C:\Server\camunda\server\apache-tomcat-9.0.12\conf (Acceso denegado)
at Method)
at org.camunda.bpm.extension.mail.config.PropertiesMailConfiguration.getProperiesAsStream(
at org.camunda.bpm.extension.mail.config.PropertiesMailConfiguration.loadProperties(
… 89 more

I have the MAIL_CONFIG variable setted in star-camunda.bat, but it seems not having access. I’m not a tomcat administrator and probably the solution is easy…



Hello @Tomas_Giner

the solution is add the environment variable not only for the folder the config is in, add the complete path for you following should work:



Thank’s a lot for your answer. I managed to solve the problem in other way: calling an external Rest service, but it’s good to know that there is a solution.



I’m using a Wildfly Shared Process Engine distro.
I put the file under ~\camunda-bpm-wildfly10-7.8.0\server\wildfly-10.1.0.Final\standalone\configuration
and I add this line:

set “MAIL_CONFIG=%JBOSS_HOME%\standalone\configuration\”

in ~\camunda-bpm-wildfly10-7.8.0\server\wildfly-10.1.0.Final\bin\standalone.bat file.

But how can I call this file in my code?



Actually I found how to do this, but if I want to set it up for a Linux machine, what do I need to do?
Should I edit the file? Or the standalone.xml?