Prepared settings

Preparing runtime settings for EmailEngine

If you do not want to update application settings via API calls, you can provide the initial settings via a command-line option (--settings) or the environment variable (EENGINE_SETTINGS). The value must be a valid JSON string that could be used against the /settings API endpoint. The behavior is identical to calling the same thing via the API, so whatever settings are given are stored in the DB.

$ emailengine --settings='{"webhooks": "https://webhook.site/14e88aea-3391-48b2-a4e6-7b617280155d","webhookEvents":["messageNew"]}'

When using Docker Compose, where environment variables are defined in YAML format, you can use the following environment variable for prepared settings:

EENGINE_SETTINGS: >
    {
        "webhooks": "https://webhook.site/f6a00604-7407-4f40-9a8e-ab68a31a3503",
        "webhookEvents": [
            "messageNew", "messageDeleted"
        ]
    }

If the settings object fails validation, then the application does not start.