邮件任务配置(Activiti其余部分)

时间:2018-12-10 08:56:59

标签: rest email gmail task activiti

我尝试用activiti rest配置邮件任务,我以以下方式修改activiti-custom-context.xml文件和engine.properties文件:

activiti-custom-context.xml

<property name="mailServerHost" value="smtp.gmail.com"/>
<property name="mailServerPort" value="465"/>
<property name="mailServerUseTLS" value="false"/>
<property name="mailServerUseSSL" value="true"/>
<property name="mailServerDefaultFrom" value="myadress@gmail.com"/>
<property name="mailServerUsername" value="myadress@gmail.com"/>
<property name="mailServerPassword" value="*************"/>

engine.properties

engine.email.enabled=true
engine.email.host="smtp.gmail.com"

email.port=465

email.useCredentials=true

email.username=myadress@gmail.com
email.password=*********
email.ssl=true
email.tls=false

email.base.url=http://localhost:8080/activiti-app

email.from.default=myadress@gmail.com

email.from.default.name=myname

错误,我收到此错误500

{
"message": "Internal server error",
"exception": "Could not send e-mail in execution 20001"
}

1 个答案:

答案 0 :(得分:0)

Gmail不允许使用安全性较低的登录技术的应用和设备访问您的帐户。如果可以发送发送问题的邮件,可以打开“允许降低安全性访问帐户的权限”并测试您的邮件任务,但请注意自己在做什么。