cancel
Showing results for 
Search instead for 
Did you mean: 

Email configuration - Activiti REST

anjan
Champ in-the-making
Champ in-the-making
We are using Activiti REST and we would like to configure Mail Server host and Port for sending emails.  I saw that activiti-custom-context.xml file has 'mailServerHost' and 'mailServerPort' properties configured for the bean processEngineConfiguration.  But all this configuration is commented out.  Please advice.  We are using the latest Activiti version 5.17.0
6 REPLIES 6

anjan
Champ in-the-making
Champ in-the-making
Can anyone help me.

anjan
Champ in-the-making
Champ in-the-making
Hi Martin, I saw this configuration.  But activiti.cfg.xml file doesn't exist any more in the latest version of Activiti 5.17.0.  Am I missing something?  Please advice.

martin_grofcik
Confirmed Champ
Confirmed Champ
ProcessEngine can be configured by class too (org.activiti.engine.ProcessEngineConfiguration)
for tests:
org.activiti.rest.conf.engine.ActivitiEngineConfiguration

attributes are the same.

Regards
Martin

anjan
Champ in-the-making
Champ in-the-making
Hi Martin,

I see that explorer module engine configuration (https://github.com/Activiti/Activiti/blob/master/modules/activiti-webapp-explorer2/src/main/java/org...) has Email configuration changes,

<code>
String mailEnabled = environment.getProperty("engine.email.enabled");
   if ("true".equals(mailEnabled)) {
     processEngineConfiguration.setMailServerHost(environment.getProperty("engine.email.host"));
     int emailPort = 1025;
     String emailPortProperty = environment.getProperty("engine.email.port");
     if (StringUtils.isNotEmpty(emailPortProperty)) {
       emailPort = Integer.valueOf(emailPortProperty);
     }
     processEngineConfiguration.setMailServerPort(emailPort);
     String emailUsernameProperty = environment.getProperty("engine.email.username");
     if (StringUtils.isNotEmpty(emailUsernameProperty)) {
       processEngineConfiguration.setMailServerUsername(emailUsernameProperty);
     }
    
     String emailPasswordProperty = environment.getProperty("engine.email.password");
      if (StringUtils.isNotEmpty(emailPasswordProperty)) {
        processEngineConfiguration.setMailServerPassword(emailPasswordProperty);
      }
</code>

But the rest module (https://github.com/Activiti/Activiti/blob/master/modules/activiti-webapp-explorer2/src/main/java/org...) doesn't have the same.

So if I add this to REST and configure the email settings in engine.properties, this should work right?

martin_grofcik
Confirmed Champ
Confirmed Champ
OK, I see the issue.
Please add it there and create a pull request.

Regards
Martin