0
下面的代码片段:Zend的SMTP无连接可以作出,因为目标机器积极地拒绝
$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('[email protected]', 'Some Sender');
$mail->addTo('[email protected]', 'Some Recipient');
$mail->setSubject('TestSubject');
$mail->send($transport);
...抛出以下错误:
"No connection could be made because the target machine actively refused."
什么是在片段中的错误?我只是从zend框架在线教程中获取它。
在此先感谢。
最有可能它要么错误的凭据或身份验证方法,或者SMTP服务器拒绝基于IP或任何连接。您应该查看SMTP服务器的所有者提供的有关如何连接到其服务器以发送邮件的文档。 – CBroe 2013-03-25 12:40:56
@CBroe无法理解,请发表评论,可以查阅一些确切的线索或文档。 – Bharanikumar 2013-03-25 12:48:23