Support setting mail configuration in runtime or system properties

Description

Currently the only way to configure the email settings used by the OpenMRS Message Service is to set these via global properties. However, this includes settings like the mail user and mail password that are better secured and managed as runtime properties.

For backwards compatibility, we should continue to support these global properties. However, one should be able to also set / override these values through runtime properties (or even system properties). This would also be a valuable utility to offer up in the API in general - to be able to get a configuration value that could be defined in any of system / runtime / global properties, where system > runtime > global in terms of precedence.

/ / / interested in thoughts.

Burke, I know you have a lot of opinions about configuration in general. I'm not trying to solve our entire configuration issue, just provide the ability to secure / override certain existing global properties better if desired.

Activity

Show:

Mike Seaton February 17, 2022 at 1:39 PM

Mike Seaton February 17, 2022 at 1:32 PM

Daniel Kayiwa February 17, 2022 at 10:17 AM

Mike Seaton February 16, 2022 at 4:08 PM

- I have issued a PR for up-porting this to 2.4.x, as 2.4.x was sufficiently different as to not be a simple cherry-pick (junit 4->5, and differences in applicationContext definitions). Would you mind having a look? https://github.com/openmrs/openmrs-core/pull/3997

Mike Seaton February 15, 2022 at 6:05 PM

Thanks ! I updated the Fix Version to 2.3.6, as it looks like 2.3.5 was recently released.

Fixed

Details

Assignee

Reporter

Complexity

Low

Priority

Created February 15, 2022 at 3:55 PM
Updated April 19, 2022 at 5:42 PM
Resolved April 19, 2022 at 5:42 PM