cancel
Showing results for 
Search instead for 
Did you mean: 

not send Email

artspider
Champ in-the-making
Champ in-the-making
I created a flow but the problem is that I put box "Mail Task" of send Email, not working, gives me the next warning "Could not send E-Mail", and not send Email, thanks so much for any help.


I not sure if  I have to setup something more for this box.
3 REPLIES 3

frederikherema1
Star Contributor
Star Contributor
Take a look at the user guide, configuration section. It has a part about the mail-server host and port. Make sure these are setup correctly and that that host is reachable from the machine activiti is on. If you checked this and still no success, take a look at the logs and dig up the root cause of why the email cannot be sent… Its should be somewhere down in the exception-hierarchy.

artspider
Champ in-the-making
Champ in-the-making
thanks so much for you answer, one questions is possible that I can use the api javamail in activiti framework?

frederikherema1
Star Contributor
Star Contributor
For ease of use, we use commons-email library in the org.activiti.engine.impl.bpmn.behavior.MailActivityBehavior. If you want to use javax.mail or any other framework, you can just implement a custom JavaDelegate and use that in a serviceTask, instead of en email-task and use field-injection (see userguide) to configure the from, to, … fields in the BPMN-file. Inside your JavaDelegate implementation, you can access those fields and populate an email-message and send it.