If the "From" field is left blank for a mail task configuration in a process, during execution of this mail task it is always sent from "activiti@localhost" instead of using the default value from the property email.from.default configured in activiti-app.properties.
The mail task documentation states otherwise:
"The sender’s email address. If you do not specify this, the default configured system-wide setting from address is used."
Steps to reproduce
1. Configure APS to use a mail server. For dev purpose you could use a fake SMTP server (http://www.aboutmyip.com/AboutMyXApp/DevNullSmtp.jsp) with similar settings:
2. Via App Designer model a process using a mail task and configure To, Subject and Text but keep the From field configuration blank.
3. Create an app with this process and publish it
4. Run the process from the published app and inspect the sent email
The email sent through the mail task should be sent from the value as configured via the email.from.default property
The email sent through the mail task is sent from activiti@localhost, which seems to be the engine default from value for mail tasks.
- Reproduced with current latest APS release
- Issue is in com.activiti.conf.ActivitiEngineConfiguration.java, where we set all other configured email values, e.g. the host:
We should indeed do the same and set the default for mailServerDefaultFrom, i.e.