cancel
Showing results for 
Search instead for 
Did you mean: 

mail server settings for activiti explorer

gurolakman
Champ in-the-making
Champ in-the-making
I created a simple flow comprising a single "send mail task" under Eclipse and tested its behavior successfully after configuring the mail server properties in an associated <activiti.cfg.xml> file as follows:

<property name="mailServerHost" value="smtp.gmail.com" />
<property name="mailServerPort" value="465" />
<property name="mailServerUsername" value="…" />
<property name="mailServerPassword" value="…" />
<property name="mailServerUseSSL" value="true" />

I then deployed the same flow on the activiti explorer (portal), configured the <engine.properties> file for activiti-explorer as follows, and wanted to test its behavior once again (i.e., by starting the flow manually from the portal).

engine.email.enabled=true
engine.email.host=smtp.gmail.com
engine.email.port=465
engine.email.username=…
engine.email.password=…
engine.email.usessl=true

Unfortunately, I failed to get my flow to work properly (i.e., the email send attempt to smtp.gmail.com:465 timed out).

I'm wondering if this failure may be triggered by the "engine.email.usessl" property setting above and whether the property name is valid. I wasn't able to find a comprehensive list of valid <engine.email.*> properties in the user guide.

Any insight will be greatly appreciated.
7 REPLIES 7

gurolakman
Champ in-the-making
Champ in-the-making
attaching copies of activiti.cfg.xml and stack trace.

vasile_dirla
Star Contributor
Star Contributor
Hi,
You could start investigating into this class: MailActivityBehavior

find this line:
email.setSSLOnConnect(processEngineConfiguration.getMailServerUseSSL());
and check if the values set into the email object are correct.

As i know google also needs TLS = true
<code>
<property name="mailServerUseTLS" value="true" />
</code>

ir
Champ in-the-making
Champ in-the-making
Hi,

I had a similar problem. The documentation and naming of properties are somewhat inconsistent using Spring Boot, I had to use <java>mailServerUseTls</java> (camelCase) instead of <java>mailServerUseTLS</java>. Maybe worth a try I guess.

Check out: https://github.com/Activiti/Activiti/search?utf8=%E2%9C%93&q=MailServerUseSsl&type=Code

gurolakman
Champ in-the-making
Champ in-the-making
Thank you both for your suggestions. After further reading and some more investigation, I decided to remove all e-mail server related settings (including advanced mail settings around SSL/TLS use) that I inserted earlier in the engine.properties files (for activiti-exporer and activiti-rest) and move them into the following files:

./webapps/activiti-explorer/WEB-INF/classes/activiti-custom-context.xml
./webapps/activiti-rest/WEB-INF/classes/activiti-custom-context.xml

as part of org.activiti.spring.SpringProcessEngineConfiguration. Subsequently, I was able to send mail properly. So, my issue seems to be resolved. Once again, thanks.

vasile_dirla
Star Contributor
Star Contributor
Hi gurolakman,
I'm happy you solved it.
i'm sure it will be useful to the community to close this thread in a "Open Source" way so the other people interested in this could benefit from that.

so what do you think about sharing to the community the settings you did for gmail ? (don't forget to mask your passwords and account name Smiley Wink )

gurolakman
Champ in-the-making
Champ in-the-making
Most certainly Smiley Happy Attached pls find copies of the config files that I used for activiti-explorer and activiti-rest, respectively.

vasile_dirla
Star Contributor
Star Contributor
Great,
Thanks for your contribution.