Disable mail with Spring Profile

Hi,

We are running flowable in 3 environments. When in DEV I want to disable mail, so it doesn’t send the email to actual approvers but I still need to be able to test the bpmn. I tried to create a Spring profile to be used in DEV, but it is not woking. Are there any yaml properties that I can specify?

Thanks.

I come across this. Will this override all the emails normally set to be used in Prod?

Flowable Mail {sc-flowable-boot}/FlowableMailProperties.java[FlowableMailProperties]

flowable.mail.server.default-from=flowable@localhost # The default from address that needs to be used when sending emails.
flowable.mail.server.force-to= # The force to address(es) that would be used when sending out emails. IMPORTANT: If this is set then all emails will be send to defined address(es) instead of the address configured in the MailActivity.
flowable.mail.server.host=localhost # The host of the mail server.
flowable.mail.server.password= # The password for the mail server authentication.
flowable.mail.server.port=1025 # The port of the mail server.
flowable.mail.server.use-ssl=false # Sets whether SSL/TLS encryption should be enabled for the SMTP transport upon connection (SMTPS/POPS).
flowable.mail.server.use-tls=false # Set or disable the STARTTLS encryption.
flowable.mail.server.username= # The username that needs to be used for the mail server authentication. If empty no authentication would be used.

It sounds like your stir fry isn’t quite what you expected?

What does your POM look like?

For example: pom.xml

And your DEV properties file?

For example: application-dev.properties

application-dev.yml looks like this for flowable
flowable:
mail:
server:
host: mail.server
port: 25
use-tls: false

application-teamEmail.yml
Then I created another profile to add force-to
flowable:
mail:
server:
force-to: <team_email>