[bitnami/jasperreports] Fix SMTP settings for Jasperreports (#7190)

* Add smtp as a valid setting for SMTP protocol

"smtp" is a valid option for JASPERREPORTS_SMTP_PROTOCOL, and is the
value that should be used in almost all cases.

Signed-off-by: Grant Emsley <grant@emsley.ca>
Co-authored-by: Fran Mulero <fmulero@vmware.com>
This commit is contained in:
Grant Emsley
2022-10-04 09:12:24 -04:00
committed by GitHub
parent 06989fc6db
commit c18f34417b
3 changed files with 3 additions and 3 deletions

View File

@@ -102,7 +102,7 @@ export JASPERREPORTS_SMTP_USER="${JASPERREPORTS_SMTP_USER:-}" # only used during
JASPERREPORTS_SMTP_PASSWORD="${JASPERREPORTS_SMTP_PASSWORD:-"${SMTP_PASSWORD:-}"}"
export JASPERREPORTS_SMTP_PASSWORD="${JASPERREPORTS_SMTP_PASSWORD:-}" # only used during the first initialization
JASPERREPORTS_SMTP_PROTOCOL="${JASPERREPORTS_SMTP_PROTOCOL:-"${SMTP_PROTOCOL:-}"}"
export JASPERREPORTS_SMTP_PROTOCOL="${JASPERREPORTS_SMTP_PROTOCOL:-}" # only used during the first initialization
export JASPERREPORTS_SMTP_PROTOCOL="${JASPERREPORTS_SMTP_PROTOCOL:-smtp}" # only used during the first initialization
# Database configuration
export JASPERREPORTS_DATABASE_TYPE="${JASPERREPORTS_DATABASE_TYPE:-mariadb}" # only used during the first initialization

View File

@@ -98,7 +98,7 @@ jasperreports_validate() {
done
is_empty_value "$JASPERREPORTS_SMTP_PORT_NUMBER" && print_validation_error "The JASPERREPORTS_SMTP_PORT_NUMBER environment variable is empty or not set."
! is_empty_value "$JASPERREPORTS_SMTP_PORT_NUMBER" && check_valid_port "JASPERREPORTS_SMTP_PORT_NUMBER"
! is_empty_value "$JASPERREPORTS_SMTP_PROTOCOL" && check_multi_value "JASPERREPORTS_SMTP_PROTOCOL" "ssl tls"
! is_empty_value "$JASPERREPORTS_SMTP_PROTOCOL" && check_multi_value "JASPERREPORTS_SMTP_PROTOCOL" "smtp smtps ssl tls"
fi
return "$error_code"

View File

@@ -284,7 +284,7 @@ To configure JasperReports to send email using SMTP you can set the following en
- `JASPERREPORTS_SMTP_PORT_NUMBER`: SMTP port.
- `JASPERREPORTS_SMTP_USER`: SMTP account user.
- `JASPERREPORTS_SMTP_PASSWORD`: SMTP account password.
- `JASPERREPORTS_SMTP_PROTOCOL`: If specified, SMTP protocol to use. Allowed values: *tls*, *ssl*. No default.
- `JASPERREPORTS_SMTP_PROTOCOL`: If specified, SMTP protocol to use. Allowed values: *smtp*, *smtps*, *tls*, *ssl*. Default: **smtp**.
##### JasperReports base URL configuration