【发布时间】:2012-10-03 21:35:05
【问题描述】:
对于这个问题的漫无边际的性质,我深表歉意,请多多包涵,我将提供您所需的所有额外信息,以防止我在看似非常简单的事情上失败而发疯......
我刚刚安装了 CakePHP 2.2,我做的第一件事就是添加 cakeDC 用户插件。除了在用户注册时发送电子邮件验证之外,一切正常。
我在 email.php 中尝试了很多不同的组合,现在我完全把我的短裤弄得一团糟。不管我做什么,当验证邮件应该发送时,我得到的只是:无法建立连接,因为目标机器主动拒绝。
我的 email.php 目前看起来像这样:
类 EmailConfig {
public $default = array(
'transport' => 'Smtp',
'from' => 'blah@gmail.com',
//'charset' => 'utf-8',
//'headerCharset' => 'utf-8',
);
public $smtp = array(
'transport' => 'Smtp',
'from' => array('Blah <blah@gmail.com>' => 'Chimp'),
'host' => 'ssl://smtp.gmail.com',
'port' => 465,
'timeout' => 30,
'username' => 'blah@gmail.com',
'password' => 'secret',
'client' => null,
'log' => false,
//'charset' => 'utf-8',
//'headerCharset' => 'utf-8',
);
public $fast = array(
'from' => 'blah@blah.net',
'sender' => null,
'to' => null,
'cc' => null,
'bcc' => null,
'replyTo' => null,
'readReceipt' => null,
'returnPath' => null,
'messageId' => true,
'subject' => null,
'message' => null,
'headers' => null,
'viewRender' => null,
'template' => false,
'layout' => false,
'viewVars' => null,
'attachments' => null,
'emailFormat' => null,
'transport' => 'Smtp',
'host' => 'blah.net',
'port' => 25,
'timeout' => 30,
'username' => 'user',
'password' => 'secret',
'client' => null,
'log' => true,
//'charset' => 'utf-8',
//'headerCharset' => 'utf-8',
);
}
如何让 cakeDC 用户插件仅发送非 SMTP 电子邮件?还是我有可以使用,例如,我的 Gmail 详细信息?但是,如果我必须走 SMTP 路由,上面有什么问题?
其他信息:我使用的是最新版本的 XAMPP,并且我的 PHP 安装启用了 ssl。
【问题讨论】:
-
哦,如果我将$default的传输改回Mail,注册页面会一直运行到完成,声称已经发送了一封电子邮件(而不是错误),但是没有电子邮件到达。
标签: php email cakephp smtp cakedc