【发布时间】:2012-04-21 01:08:23
【问题描述】:
我知道有很多关于这个主题的问题,但仍然无法弄清楚出了什么问题。
这是我的代码:
$this->Email->to = 'any@mailadress.com';
$this->Email->subject = 'any subject';
$this->Email->replyTo = 'noreply@mailadress.com';
$this->Email->from = 'Somebody <noreply@mailadress.com>';
$this->Email->additionalParams = '-fnoreply@mailadress.com';
$this->Email->template = 'my_template';
$this->Email->sendAs = 'text';
$this->Email->smtpOptions = array(
'port'=>'465',
'timeout'=>'30',
'host' => 'ssl://smtp.googlemail.com', // also tried smtp.gmail.com
'username'=>'username',
'password'=>'pass',
);
$this->Email->send();
现在这只会导致“连接超时:110”。我尝试了其他几种邮寄服务。总是得到连接错误。
帮助非常感谢。
【问题讨论】: