use Validate::validateEmail() also for PHPMailer::ValidateAddress() call

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2020-11-17 17:31:49 +01:00
parent caf8893558
commit 5b85a1c183

View File

@@ -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'));