cakePHP和邮件组件:拒绝连接:61

cakePHP和邮件组件:拒绝连接:61,php,cakephp,smtp,email,xampp,Php,Cakephp,Smtp,Email,Xampp,你好! 我正试图将简单的邮件功能添加到一个小web应用程序中,但我被卡住了。我可以在本地机器上从终端向自己发送电子邮件,但当我尝试运行应用程序时,我得到“连接被拒绝:61” 起初,我认为我的设置是一团糟,我继续与他们玩了一段时间,现在决定放弃在这一点上: $this->Email->smtpOptions = array( 'port'=>'25', 'timeout'=>'30', 'host' => 'user-power-mac-g5.loc

你好! 我正试图将简单的邮件功能添加到一个小web应用程序中,但我被卡住了。我可以在本地机器上从终端向自己发送电子邮件,但当我尝试运行应用程序时,我得到“连接被拒绝:61”

起初,我认为我的设置是一团糟,我继续与他们玩了一段时间,现在决定放弃在这一点上:

$this->Email->smtpOptions = array(
   'port'=>'25',
   'timeout'=>'30',
   'host' => 'user-power-mac-g5.local',
   'username'=>'',
   'password'=>'',
   'client' => 'user@users-power-mac-g5.local'
)

$this->Email->delivery = 'smtp';

$User = "some user"; 
$this->Email->to = 'user@users-power-mac-g5.local';

$this->Email->subject = 'Welcome';
$this->Email->replyTo = 'user@users-power-mac-g5.local';
$this->Email->from = 'Web App <user@users-power-mac-g5.local>';
$this->Email->sendAs = 'text'; 
$this->set('User', $User);
$this->Email->send();
$this->set('smtp-errors', $this->Email->smtpError);
$this->Email->smtpOptions=array(
“端口”=>“25”,
“超时”=>“30”,
'host'=>'user-power-mac-g5.local',
'用户名'=>'',
'密码'=>'',
'客户端'=>'user@users-power-mac-g5.本地'
)
$this->Email->delivery='smtp';
$User=“some User”;
$this->Email->to=user@users-power-mac-g5.local';
$this->Email->subject='Welcome';
$this->Email->replyTo='suser@users-power-mac-g5.local';
$this->Email->from='webapp';
$this->Email->sendAs='text';
$this->set('User',$User);
$this->Email->send();
$this->set('smtp-errors',$this->Email->smtpError);
我试图在XAMPP上使用CakePHP1.2.5运行它,并且只运行核心邮件组件。
提前谢谢

许多ISP阻止端口25以防止垃圾邮件。您可能想尝试使用备用SMTP端口-587是最常见的。如果这不起作用,那么使用sendmail而不是SMTP可能会起作用

许多ISP阻止端口25以防止垃圾邮件。您可能想尝试使用备用SMTP端口-587是最常见的。如果这不起作用,那么使用sendmail而不是SMTP可能会起作用

谢谢!!尝试了alt端口-没有乐趣,注释掉了SMTP细节和传递-它工作得很好,至少在本地开发人员机器上是这样。我们来看看野外会发生什么:-)谢谢!尝试了alt端口-没有乐趣,注释掉了SMTP细节和传递-它工作得很好,至少在本地开发人员机器上是这样。我们来看看野外会发生什么:-)