07-05-2018 07:56 AM
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!
07-11-2018 07:51 AM
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?
07-11-2018 08:59 AM
Hi Bassam Al-Sarori,
I am using the same email address in both the places.
07-11-2018 10:25 AM
I don't think it's an issue with Activiti seems a permissions issue. Can you try another mail server?
07-12-2018 01:56 AM
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.
07-12-2018 06:11 AM
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.
Explore our Alfresco products with the links below. Use labels to filter content by product module.