diff --git a/action/banner.php b/action/banner.php index abba902..107834d 100644 --- a/action/banner.php +++ b/action/banner.php @@ -87,10 +87,8 @@ function showBanner() { global $INFO; if ($this->getConf('apr_mail_receiver') !== '' && $INFO['isadmin']) { - $validator = new EmailAddressValidator(); - $validator->allowLocalAddresses = true; $addr = $this->getConf('apr_mail_receiver'); - if(!$validator->check_email_address($addr)) { + if(!mail_isvalid($addr)) { msg(sprintf($this->getLang('mail_invalid'),htmlspecialchars($addr)),-1); } diff --git a/action/mail.php b/action/mail.php index b816fba..364d6da 100644 --- a/action/mail.php +++ b/action/mail.php @@ -62,10 +62,8 @@ function send_change_mail(&$event, $param) { // get mail receiver $receiver = $this->getConf('apr_mail_receiver'); - $validator = new EmailAddressValidator(); - $validator->allowLocalAddresses = true; - if(!$validator->check_email_address($receiver)) { - dbglog(sprintf($this->getLang('mail_invalid'),htmlspecialchars($receiver))); + if(!mail_isvalid($receiver)) { + dbglog(sprintf($this->getLang('mail_invalid'), htmlspecialchars($receiver))); return false; }