@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}''
java发邮件我不是很懂,但是SMTP python十几行代码就行了,编程狮w3cschool上有java发邮件的例子你可以去看下,希望对你有帮助。
解决了吗,我也是这个问题,解决了好久,可以说一下怎么解决吗,谢谢