Detect whether app is running locally or in cloud within microflow

I have a start up microflow which sets the Email SMTP settings. When running locally we use a Mandrill server but in the cloud (Acceptance) we use the Mendix Mail Server. What split condition could I use to find out which environment it is in so that the appropriate SMTP settings can be set? I could compare on the app URL but I was looking for something a bit more exhaustive.
2 answers

Typically we use a constant to derive the server environment. Constants are stored and persisted per environment, so you would just need to set it up once in the cloud.

If the mail settings are something that could change in the future, you might consider storing the mail server config as your constant rather than just an environment flag.


You could also use the community commons GetApplicationUrl. Since Mendix is consistent with the names of the acceptance and test environments you could check with the contain function in which environment you are. We use this all the time to changes settings depending on environment.