gpt4 book ai didi

php - Pear Mail - 收件人地址被拒绝 - 错误

转载 作者:行者123 更新时间:2023-12-04 06:31:29 26 4
gpt4 key购买 nike

我在使用 Pear Mail 时遇到以下错误:

Notice: Error in sending mail: Failed to add recipient: user@domain.com [SMTP: Invalid response code received from server (code: 550, response: 5.1.1 : Recipient address rejected: User unknown in virtual mailbox table)] in /PEAR/PEAR.php on line 873

电子邮件未发送。其他电子邮件地址(例如 Gmail 和 Yahoo)工作正常。据我所知,它只会针对特定的电子邮件客户端出错。

我正在使用以下脚本发送排队的邮件:
require_once "Mail/Queue.php";

$db_options['type'] = 'mdb2';
$db_options['dsn'] = 'mysql://username:password@localhost/db';
$db_options['mail_table'] = 'mailqueue';
$mail_options['driver'] = 'smtp';
$mail_options['host'] = 'hostAddress';
$mail_options['port'] = 25;
$mail_options['localhost'] = 'localhost'; //optional Mail_smtp parameter
$mail_options['auth'] = false;
$mail_options['username'] = 'user@domain.com';
$mail_options['password'] = 'password';

$max_amount_mails = 100;
$mail_queue =& new Mail_Queue($db_options, $mail_options);
$mail_queue->sendMailsInQueue($max_amount_mails);

有没有人知道为什么特定地址会导致此错误?

我正在运行 PHP5.2/Apache2(CentOS 5.5)/Pear Mail 1.2.0/Pear Mail Queue 1.2.6/

谢谢

最佳答案

天哪,该错误消息的填充比错误还多!让我们把它分开一点。

Notice: 
Error in sending mail:
Failed to add recipient: user@domain.com
[SMTP:
Invalid response code received from server
(code: 550,
response: 5.1.1 :
Recipient address rejected:
User unknown in virtual mailbox table)]

最后一行是我们唯一关心的。

SMTP 服务器查找您使用的地址,并提示无法找到该用户。换句话说 地址是假的并且正在被拒绝。

关于php - Pear Mail - 收件人地址被拒绝 - 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5354444/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com