首页 新闻 搜索 专区 学院

activiti发送邮件失败

0
悬赏园豆:50 [待解决问题]

图片说明

 @Test
    public void test04(){
        ProcessDefinition processDefinition = processEngine.getRepositoryService().createProcessDefinitionQuery().latestVersion().singleResult();
        RuntimeService runtimeService = processEngine.getRuntimeService();
        Map<String,Object> variables = new HashMap();
        variables.put("toEmail", "test@atguigu.com");
        variables.put("authcode", "123");
        variables.put("loginacct","zhangsan");
        variables.put("passListener", new PassListener());
        variables.put("refuseListener", new RefuseListener());
        ProcessInstance processInstance = runtimeService.startProcessInstanceById(processDefinition.getId(), variables);
        System.out.println("processIstance="+processInstance);
    }

断点停在了 ProcessInstance processInstance = runtimeService.startProcessInstanceById(processDefinition.getId(), variables);
邮件能正常发送

报错信息:
org.activiti.engine.ActivitiException: Could not add ${toEmail} as recipient
Caused by: org.apache.commons.mail.EmailException: javax.mail.internet.AddressException: Missing final '@domain' in string ``${toEmail}''

SUN_MU的主页 SUN_MU | 初学一级 | 园豆:104
提问于:2020-05-18 12:27
< >
分享
所有回答(2)
0

java发邮件我不是很懂,但是SMTP python十几行代码就行了,编程狮w3cschool上有java发邮件的例子你可以去看下,希望对你有帮助。

芦苇nb | 园豆:197 (初学一级) | 2020-05-18 22:13
0

解决了吗,我也是这个问题,解决了好久,可以说一下怎么解决吗,谢谢

mercur | 园豆:202 (菜鸟二级) | 2020-07-03 12:19
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册