【发布时间】:2013-03-25 12:36:47
【问题描述】:
下面的sn-p:
$config = array('auth' => 'login',
'username' => 'myusername',
'password' => 'password');
$transport = new Zend_Mail_Transport_Smtp('mail.server.com', $config);
$mail = new Zend_Mail();
$mail->setBodyText('This is the text of the mail.');
$mail->setFrom('sender@test.com', 'Some Sender');
$mail->addTo('recipient@test.com', 'Some Recipient');
$mail->setSubject('TestSubject');
$mail->send($transport);
...抛出以下错误:
"No connection could be made because the target machine actively refused."
sn-p 中的错误是什么?我只是从 zend 框架在线教程中获取的。
提前致谢。
【问题讨论】:
-
很可能是错误的凭据或身份验证方法,或者 SMTP 服务器基于 IP 或其他原因拒绝连接。您应该查看 SMTP 服务器所有者提供的有关如何连接到其服务器以传递邮件的文档。
-
@CBroe 无法理解,请您发表评论,请您参考一些确切的线程或文档。
标签: php zend-framework