use Validate::validateEmail() also for PHPMailer::ValidateAddress() call
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -32,6 +32,14 @@ class Mailer extends \PHPMailer\PHPMailer\PHPMailer
|
|||||||
$this->Port = Settings::Get('system.mail_smtp_port');
|
$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) {
|
if (self::ValidateAddress(Settings::Get('panel.adminmail')) !== false) {
|
||||||
// set return-to address and custom sender-name, see #76
|
// set return-to address and custom sender-name, see #76
|
||||||
$this->SetFrom(Settings::Get('panel.adminmail'), Settings::Get('panel.adminmail_defname'));
|
$this->SetFrom(Settings::Get('panel.adminmail'), Settings::Get('panel.adminmail_defname'));
|
||||||
|
|||||||
Reference in New Issue
Block a user