Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add support for the tls email option
Ioannis committed May 20, 2024
1 parent 0502174 commit d48dd89
Showing 2 changed files with 18 additions and 2 deletions.
8 changes: 8 additions & 0 deletions comanage-registry-base/comanage_utils.sh
@@ -140,6 +140,7 @@ function comanage_utils::consume_injected_environment() {
COMANAGE_REGISTRY_EMAIL_FROM
COMANAGE_REGISTRY_EMAIL_TRANSPORT
COMANAGE_REGISTRY_EMAIL_HOST
COMANAGE_REGISTRY_EMAIL_TLS
COMANAGE_REGISTRY_EMAIL_PORT
COMANAGE_REGISTRY_EMAIL_ACCOUNT
COMANAGE_REGISTRY_EMAIL_ACCOUNT_PASSWORD
@@ -450,6 +451,7 @@ EOF
# COMANAGE_REGISTRY_EMAIL_FROM
# COMANAGE_REGISTRY_EMAIL_HOST
# COMANAGE_REGISTRY_EMAIL_PORT
# COMANAGE_REGISTRY_EMAIL_TLS
# COMANAGE_REGISTRY_EMAIL_TRANSPORT
# COMANAGE_REGISTRY_DIR
# Arguments:
@@ -513,6 +515,12 @@ EOF
php_string+="'port' => ${COMANAGE_REGISTRY_EMAIL_PORT},"
fi

# set tls if provided
if [[ -n "${COMANAGE_REGISTRY_EMAIL_TLS}" ]]; then
php_string+=$'\n\t\t'
php_string+="'tls' => ${COMANAGE_REGISTRY_EMAIL_TLS},"
fi

if [[ -n "${COMANAGE_REGISTRY_EMAIL_ACCOUNT}" ]]; then
php_string+=$'\n\t\t'
php_string+="'username' => '${COMANAGE_REGISTRY_EMAIL_ACCOUNT}',"
12 changes: 10 additions & 2 deletions docs/comanage-registry-common-environment-variables.md
@@ -162,15 +162,23 @@ When used together the resulting PHP is
* Description: Email server host
* Required: no
* Default: none
* Example: tls://smtp.gmail.com
* Example: tls://smtp.gmail.com OR smtp.gmail.com if the TLS option is used
* Note: \[[3](#note03)\]

```COMANAGE_REGISTRY_EMAIL_PORT```

* Description: Email server port
* Required: no
* Default: none
* Example: 465
* Example: 465 or 587
* Note: \[[3](#note03)\]

```COMANAGE_REGISTRY_EMAIL_TLS```

* Description: STARTTLS SMTP extension using the tls option
* Required: no
* Default: none
* Example: true
* Note: \[[3](#note03)\]

```COMANAGE_REGISTRY_EMAIL_ACCOUNT```

0 comments on commit d48dd89

Please sign in to comment.