问候!我正在尝试将简单的邮件功能添加到一个小型网络应用程序中,但我被卡住了。我可以在本地机器上从终端向自己发送电子邮件,但是当我尝试运行应用程序时,我得到“连接被拒绝: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);
我正在尝试在带有 cakePHP 1.2.5 且只有核心邮件组件的 XAMPP 上运行它。提前致谢!