用户
 找回密码
 入住 CI 中国社区
搜索
查看: 4542|回复: 11
收起左侧

email wenti

[复制链接]
发表于 2009-6-20 14:59:05 | 显示全部楼层 |阅读模式
Message: mail() [function.mail]: Failed to connect to mailserver at "smtp" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()
Filename: libraries/Email.php
 楼主| 发表于 2009-6-20 14:59:38 | 显示全部楼层
发表于 2009-6-20 16:56:44 | 显示全部楼层
看手册配置一下config/email.php,可能是配置参数写的不正确
 楼主| 发表于 2009-6-20 17:09:07 | 显示全部楼层
不会 讲的细点 好像是php.ini里面的问题
发表于 2009-6-20 17:36:57 | 显示全部楼层
CI_Email通过ini_set()函数动态修改php.ini的配置
 楼主| 发表于 2009-6-22 09:07:54 | 显示全部楼层
这个怎么配置:$config['protocol']='smtp';
老提示:You did not specify a SMTP hostname.
Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.
发表于 2009-6-22 10:19:27 | 显示全部楼层
 楼主| 发表于 2009-6-22 13:51:20 | 显示全部楼层
看过了
$this->load->library('email');
                $config['protocol']='smtp';
                $config['mailtype']="html";
                $config['charset']="utf-8";
                $config['validate']=true;
                $this->email->initialize($config);
                $this->email->from('your@sina.com', 'Your Name');
                $this->email->to('someone@sina.com');
                $this->email->cc('another@sina.com');
                $this->email->bcc('them@sina.com');                
                $this->email->subject('Email Test');
                $this->email->message('Testing the email class.');                
                $this->email->send();               
                echo $this->email->print_debugger();
 楼主| 发表于 2009-6-22 13:51:58 | 显示全部楼层
这个对不对 好像是我邮件服务器没装的问题
发表于 2009-6-22 15:14:12 | 显示全部楼层
smtp_host        无默认值        无        SMTP 服务器地址。
smtp_user        无默认值        无        SMTP 用户账号。
smtp_pass        无默认值        无        SMTP 密码。
smtp_port        25        无        SMTP 端口。

这个看了吗?没看这个不等于看过手册。

smtp 不给地址和端口号,怎么可能能连上呢?

本版积分规则