Issue with sending email in Activiti

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

Issue with sending email in Activiti

Hi Team,

I am using Activiti BPMN 2.0. To send email, i have below configuration in activiti.config.xml file. 

the email box i am using here is authenticated email box. But i am getting below issue while triggering email. Please help me on this.

Configuration:

<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
<property name="dataSource" ref="dataSource" />
<property name="transactionManager" ref="transactionManager" />
<property name="databaseSchemaUpdate" value="true" />
<property name="mailServerHost" value= "<smtpa host>" />
<property name="mailServerPort" value="587" />
<property name="mailServerUsername" value="<email address>" />
<property name="mailServerPassword" value="<password>" />
<property name="mailServerUseTLS" value="true" />
<property name="mailServerUseSSL" value="false"/>

</bean>

Error:

Caused by: com.sun.mail.smtp.SMTPSendFailedException: 550 5.7.60 SMTP; Client does not have permissions to send as this sender

at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2202) ~[javax.mail-1.5.2.jar:1.5.2]
at com.sun.mail.smtp.SMTPTransport.finishData(SMTPTransport.java:1980) ~[javax.mail-1.5.2.jar:1.5.2]
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1197) ~[javax.mail-1.5.2.jar:1.5.2]
at javax.mail.Transport.send0(Transport.java:254) ~[javax.mail-1.5.2.jar:1.5.2]
at javax.mail.Transport.send(Transport.java:124) ~[javax.mail-1.5.2.jar:1.5.2]
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1411) ~[commons-email-1.4.jar:1.4]

Thanks in advance!

5 Replies
Highlighted
Alfresco Employee

Re: Issue with sending email in Activiti

Seems that the user you used to authenticated against the mail server doesn't have permissions to send emails as the user specified in the mail task. In the mail task are you using the same email (for the from email address) as the address in activiti.config.xml?

Highlighted
Member II

Re: Issue with sending email in Activiti

Hi Bassam Al-Sarori‌,

I am using the same email address in both the places.

Highlighted
Alfresco Employee

Re: Issue with sending email in Activiti

I don't think it's an issue with Activiti seems a permissions issue. Can you try another mail server?

Highlighted
Member II

Re: Issue with sending email in Activiti

Yes Bassam Al-Sarori‌, i tried the same in a spring application. 

This mail server is working there where we set another property "email.ssl.trust" along with the above mentioned properties. but, i couldn't add this property in process engine configuration bean.

Highlighted
Alfresco Employee

Re: Issue with sending email in Activiti

Does the mail server use SSL? if so then you might have to set mailServerUseSSL=true. Also can you try setting the mailServerDefaultFrom to an email that is allowed to send emails by the authenticated user.