Mail Task in Activiti-Rest application

cancel
Showing results for 
Search instead for 
Did you mean: 
sonalik
Member II

Mail Task in Activiti-Rest application

Hi Team,

I have a query regarding Mail Task in Activiti-Rest application. I am using activiti-5.22.0 version.

For Mail configuration i have modified below files in Tomcat 8.0\webapps\activiti-rest\WEB-INF\classes:-

1) activiti-custom-context.xml :-

<!-- Email Server Configuration -->

<property name="mailServerHost" value="ABC" />
<property name="mailServerPort" value="25" />

<property name="mailServerDefaultFrom" value="xyz@xyz.com" />
<property name="mailServerUsername" value="xyz" />
<property name="mailServerPassword" value="xyz" />
<property name="mailServerUseSSL" value="true" />

2)engine.properties:-

 # email properties
engine.email.enabled=true
engine.email.host=ABC
engine.email.port=25
engine.email.username=xyz
engine.email.password=xyz
engine.email.ssl=true

Even after setting these properties i am not able to send mail. Getting "org.activiti.engine.ActivitiException: Could not send e-mail".

Also the rest application reads all properties correctly like the host, etc except the port. It is by default using 465 port even if i have configured 25.

Same configuration works for activiti-explorer. But fails for activiti-rest.

Looking forward for your support as always. Thanks in advance.

- Sonali

3 Replies
jearles
Established Member II

Re: Mail Task in Activiti-Rest application

Sonali,

Just as a starting point, take a gander at this thread - a previous user was attempting to do the same thing you have been, but after removing the configuration from engine.properties and only using the activiti-custom-context.xml they were able to get everything working.

Shout out to gurolakman _, for actually including his configuration files in the original thread also. Should be pretty simple to get it going Smiley Happy

Hope this helps,
-JEarles

sonalik
Member II

Re: Mail Task in Activiti-Rest application

Hi Jonathan,

Thanks for quick response.

I tried to set the email properties in "activiti-custom-context.xml" but still its not working.

I was able to solve the issue with activiti-rest by referring to the thread Email configuration - Activiti REST . As per this thread email related logic is not present in class ActivitiEngineConfiguration.java. After adding the code i was able to run email functionality for activiti-rest.

So can you please confirm whether this is right approach? Or in order to get email functionality working no source code changes is required?

Looking for your support. Thanks in advance.

--Sonali

Highlighted
jearles
Established Member II

Re: Mail Task in Activiti-Rest application

Should be fine - good find.

-JEarles