From 5b85a1c183b48f5f26757eeb92a86ae8982f3f02 Mon Sep 17 00:00:00 2001 From: Michael Kaufmann Date: Tue, 17 Nov 2020 17:31:49 +0100 Subject: [PATCH] use Validate::validateEmail() also for PHPMailer::ValidateAddress() call Signed-off-by: Michael Kaufmann --- lib/Froxlor/System/Mailer.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/Froxlor/System/Mailer.php b/lib/Froxlor/System/Mailer.php index 56b8930f..0ced5466 100644 --- a/lib/Froxlor/System/Mailer.php +++ b/lib/Froxlor/System/Mailer.php @@ -32,6 +32,14 @@ class Mailer extends \PHPMailer\PHPMailer\PHPMailer $this->Port = Settings::Get('system.mail_smtp_port'); } + /** + * use froxlor's email-validation + */ + self::$validator = [ + '\Froxlor\\Validate\\Validate', + 'validateEmail' + ]; + if (self::ValidateAddress(Settings::Get('panel.adminmail')) !== false) { // set return-to address and custom sender-name, see #76 $this->SetFrom(Settings::Get('panel.adminmail'), Settings::Get('panel.adminmail_defname'));