From db975ac682c714708911da9c63b660e4b13912e7 Mon Sep 17 00:00:00 2001 From: Marcel Richter Date: Mon, 3 Jun 2024 22:13:59 +0200 Subject: [PATCH] [bitnami/wordpress] make from_email and from_name adjustable https://github.com/bitnami/charts/issues/25174 Signed-off-by: Marcel Richter --- .../6/debian-12/rootfs/opt/bitnami/scripts/libwordpress.sh | 4 ++-- .../6/debian-12/rootfs/opt/bitnami/scripts/wordpress-env.sh | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/bitnami/wordpress/6/debian-12/rootfs/opt/bitnami/scripts/libwordpress.sh b/bitnami/wordpress/6/debian-12/rootfs/opt/bitnami/scripts/libwordpress.sh index a2f6fd4bcbe4f..608efbd85dcde 100644 --- a/bitnami/wordpress/6/debian-12/rootfs/opt/bitnami/scripts/libwordpress.sh +++ b/bitnami/wordpress/6/debian-12/rootfs/opt/bitnami/scripts/libwordpress.sh @@ -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" diff --git a/bitnami/wordpress/6/debian-12/rootfs/opt/bitnami/scripts/wordpress-env.sh b/bitnami/wordpress/6/debian-12/rootfs/opt/bitnami/scripts/wordpress-env.sh index 96f61951f48ec..0493d215259da 100644 --- a/bitnami/wordpress/6/debian-12/rootfs/opt/bitnami/scripts/wordpress-env.sh +++ b/bitnami/wordpress/6/debian-12/rootfs/opt/bitnami/scripts/wordpress-env.sh @@ -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