私はPHPMailerを初めて使用しています。私のlocalhostではうまくいきますが、ライブではうまくいきません。メッセージ「無効なアドレス」を含むphpmailerException
私はこのエラーを取得する:
if (!self::ValidateAddress($address)) {
$this->SetError($this->Lang('invalid_address').': '. $address);
if ($this->exceptions) {
throw new phpmailerException($this->Lang('invalid_address').': '.$address);
}
if ($this->SMTPDebug) {
echo $this->Lang('invalid_address').': '.$address;
}
return false;
}
/directoryhere/test/public_html/scripts/phpmailer/class.phpmailer.php(438)
:
Fatal error: Uncaught exception 'phpmailerException' with message 'Invalid address: ' in /directoryhere/test/public_html/scripts/phpmailer/class.phpmailer.php:498 Stack trace: #0 /directoryhere/test/public_html/scripts/phpmailer/class.phpmailer.php(438): PHPMailer->AddAnAddress('to', '', '') #1 /directoryhere/test/public_html/scripts/include.php(189): PHPMailer->AddAddress('', '') #2 /directoryhere/test/public_html/forgot.php(49): send_mail() #3 /directoryhere/test/public_html/index.php(141): include('/home1/test...') #4 {main} thrown in /directoryhere/test/public_html/scripts/phpmailer/class.phpmailer.php on line 498
これは、コードの行
/directoryhere/test/public_html/scripts/phpmailer/class.phpmailer.php:498
ある
public function AddAddress($address, $name = '') {
return $this->AddAnAddress('to', $address, $name);
}
でした誰もこれの原因となる可能性のあるものを教えてください。
私は、新しいメールホストが必要ですか? –
このエラーメッセージは、電子メールアドレスをまったく渡していないことを示しています。そのため、PHPMailerではなく、呼び出しコードを確認してください。 – Synchro
まあ、**あなたが投げるアドレスは何ですか**ですか? – m02ph3u5