From 31f5063a96f3e5100a323592d8df7b3255df52a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20BENO=C3=8ET?= Date: Thu, 2 Jan 2025 16:53:36 +0100 Subject: [PATCH] feat: read mail sender address from configuration --- game/scripts/game/main/library/sendMail.inc | 5 +++-- game/scripts/legacyworlds.xml | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/game/scripts/game/main/library/sendMail.inc b/game/scripts/game/main/library/sendMail.inc index e69fd02..94bd931 100644 --- a/game/scripts/game/main/library/sendMail.inc +++ b/game/scripts/game/main/library/sendMail.inc @@ -29,10 +29,11 @@ class main_sendMail { $mail = preg_replace($subst, $vals, $mail); $tmp = explode("\n", $mail); $subject = array_shift($tmp); + $from = config::getParam('mailfrom'); $mail = join("\n", $tmp); - $header = "From: webmaster@legacyworlds.com\r\n" - . "Reply-To: webmaster@legacyworlds.com\r\n" + $header = "From: $from\r\n" + . "Reply-To: $from\r\n" . "X-Mailer: LegacyWorlds\r\n" . "Mime-Version: 1.0\r\n" . "Content-Type: text/plain; charset=iso-8859-1"; diff --git a/game/scripts/legacyworlds.xml b/game/scripts/legacyworlds.xml index f0bb483..0e680bf 100644 --- a/game/scripts/legacyworlds.xml +++ b/game/scripts/legacyworlds.xml @@ -9,6 +9,9 @@ + + +