[bitnami/wordpress] make from_email and from_name adjustable (#67399)

https://github.com/bitnami/charts/issues/25174

Signed-off-by: Marcel Richter <mail@mrclrchtr.de>
This commit is contained in:
Marcel Richter
2024-06-12 09:43:56 +02:00
committed by GitHub
parent 73a332508d
commit 578b365049
2 changed files with 8 additions and 2 deletions

View File

@@ -663,8 +663,8 @@ wordpress_configure_smtp() {
fi
wp_execute plugin install wp-mail-smtp "${install_smtp_plugin_args[@]}"
info "Configuring SMTP settings"
wp_execute option patch update wp_mail_smtp mail from_email "$WORDPRESS_SMTP_USER"
wp_execute option patch update wp_mail_smtp mail from_name "${WORDPRESS_FIRST_NAME} ${WORDPRESS_LAST_NAME}"
wp_execute option patch update wp_mail_smtp mail from_email "$WORDPRESS_SMTP_FROM_EMAIL"
wp_execute option patch update wp_mail_smtp mail from_name "$WORDPRESS_SMTP_FROM_NAME"
wp_execute option patch update wp_mail_smtp mail mailer "smtp"
wp_execute option patch insert wp_mail_smtp smtp host "$WORDPRESS_SMTP_HOST"
wp_execute option patch insert wp_mail_smtp smtp port "$WORDPRESS_SMTP_PORT_NUMBER"

View File

@@ -65,6 +65,8 @@ wordpress_env_vars=(
WORDPRESS_SMTP_USER
WORDPRESS_SMTP_PASSWORD
WORDPRESS_SMTP_PROTOCOL
WORDPRESS_SMTP_FROM_EMAIL
WORDPRESS_SMTP_FROM_NAME
WORDPRESS_DATABASE_HOST
WORDPRESS_DATABASE_PORT_NUMBER
WORDPRESS_DATABASE_NAME
@@ -179,6 +181,10 @@ WORDPRESS_SMTP_PASSWORD="${WORDPRESS_SMTP_PASSWORD:-"${SMTP_PASSWORD:-}"}"
export WORDPRESS_SMTP_PASSWORD="${WORDPRESS_SMTP_PASSWORD:-}" # only used during the first initialization
WORDPRESS_SMTP_PROTOCOL="${WORDPRESS_SMTP_PROTOCOL:-"${SMTP_PROTOCOL:-}"}"
export WORDPRESS_SMTP_PROTOCOL="${WORDPRESS_SMTP_PROTOCOL:-}" # only used during the first initialization
WORDPRESS_SMTP_FROM_EMAIL="${WORDPRESS_SMTP_FROM_EMAIL:-"${SMTP_USER:-}"}"
export WORDPRESS_SMTP_FROM_EMAIL="${WORDPRESS_SMTP_FROM_EMAIL:-}" # only used during the first initialization
WORDPRESS_SMTP_FROM_NAME="${WORDPRESS_SMTP_FROM_NAME:-"${WORDPRESS_FIRST_NAME} ${WORDPRESS_LAST_NAME}"}"
export WORDPRESS_SMTP_FROM_NAME="${WORDPRESS_SMTP_FROM_NAME:-}" # only used during the first initialization
# Database configuration
export WORDPRESS_DEFAULT_DATABASE_HOST="mariadb" # only used at build time