如何在WSO2产品中设置SMTP Office365邮件配置

时间:2018-12-14 09:06:37

标签: email smtp wso2 smtp-auth wso2bps

我们正在尝试在WSO2产品中设置SMTP邮件配置。按照以下步骤在WSO2BPMN产品中设置SMTP邮件配置。

  1. /conf/activiti.xml
  2. 中更改SMTP配置
<property name="mailServerHost" value="smtp.office365.com"/>
<property name="mailServerPort" value="587"/>
<property name="mailServerDefaultFrom" value="XXX@YYY.COM"/>
<property name="mailServerUseTLS" value="true"/>
<property name="mailServerUsername" value="XXX@YYY.COM"/>
<property name="mailServerPassword" value="XXX"/>
  1. 重新启动Wso2BPMN产品以应用wso2bpmn中的更改。

但是,我们面临通过wso2bpmn产品从Office365发送邮件的问题。在这里,我已经解决了以下问题,

 Caused by: org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.office365.com:587
        at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1398)
        at org.apache.commons.mail.Email.send(Email.java:1423)
        at org.activiti.engine.impl.bpmn.behavior.MailActivityBehavior.execute(MailActivityBehavior.java:102)
        ... 192 more
Caused by: com.sun.mail.smtp.SMTPSendFailedException: 554 5.2.0 STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied; Failed to process message due to a permanent exception with message Cannot submit message. 16.55847:780E0000, 17.43559:0000000094000000000000000000000000000000, 20.52176:140F9185000010100A00D231, 20.50032:140F9185701710100A00E231, 0.35180:62350000, 255.23226:0A00C931, 255.27962:0A000000, 255.27962:0E000000, 255.31418:0A000000, 16.55847:B2000000, 17.43559:0000000068010000000000000200000000000000, 20.52176:140F9185000010107B350000, 20.50032:140F91857017101080350000, 0.35180:0A00D330, 255.23226:85350000, 255.27962:0A000000, 255.27962:32000000, 255.17082:DC040000, 0.27745:8F350000, 4.21921:DC040000, 255.27962:FA000000, 255.1494:0A007530, 0.37692:04000100, 0.37948:04000100, 5.33852:00000000534D545000040480, 4.56248:DC040000, 7.40748:010000000000010B05000780, 7.57132:000000000000000000000000, 1.63016:32000000, 4.39640:DC040000, 8.45434:DD08C5FEDCC4AE4D81EB3D16E07C62BF00000000, 5.10786:0000000031352E32302E313432352E3030303A414D30505230374D42353436303A65353332653963312D613162352D343633372D383933632D35393263323535396364343300000000000000, 255.1750:2A310000, 255.31418:0A003F32, 0.22753:2F310000, 255.21817:DC040000, 4.60547:DC040000, 0.21966:0A009530, 4.30158:DC040000 [Hostname=AM0PR07MB5460.eurprd07.prod.outlook.com]

请为此提供任何建议/想法。

谢谢, Vivek KT。

1 个答案:

答案 0 :(得分:0)

我也发生了同样的事情。就我而言,问题是我从未使用该电子邮件帐户输入过,并且尚未配置。配置完成后,对我来说效果很好。

首先连接到outlook.com并设置该帐户,然后尝试wso2。

然后我将所有电子邮件信息都放入conf / axis2 / axis2.xml