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