Home > Backend Development > PHP Tutorial > PHP发送邮件有关问题:邮件已发送,返回Invalid address

PHP发送邮件有关问题:邮件已发送,返回Invalid address

WBOY
Release: 2016-06-13 12:06:44
Original
1550 people have browsed it

PHP发送邮件问题:邮件已发送,返回Invalid address:
如图所示:
为什么会出现这样的情况?

------解决思路----------------------
  public function AddAddress($address, $name = '') {
    return $this->AddAnAddress('to', $address, $name);
  }

  private function AddAnAddress($kind, $address, $name = '') {
    if (!preg_match('/^(to
------解决思路----------------------
cc
------解决思路----------------------
bcc
------解决思路----------------------
ReplyTo)$/', $kind)) {
      echo 'Invalid recipient array: ' . kind;
      return false;
    }
    $address = trim($address);
    $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
    if (!self::ValidateAddress($address)) {
      $this->SetError($this->Lang('invalid_address').': '. $address);
      if ($this->exceptions) {
        throw new phpmailerException($this->Lang('invalid_address').': '.$address);
      }
      echo $this->Lang('invalid_address').': '.$address;
      return false;

    }
 ...

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template