SaxonC 发表于 2011-3-10 14:00:35

CI 2.0 发送Email 设置问题,请大家热心帮助

刚刚接触CI,就碰到问题了
想做邮件推送,就写了
<?php
class Email extends CI_Controller{
function __construct(){
parent::__construct();
}
function index()
{
$config = Array(
      'protocol' => 'smtp',
      'smtp_host' => 'smtp.163.com',
      'smtp_user' => 'xxx@163.com'',
      'smtp_pass' => 'xxxx',
         );
$this->load->library('email',$config);
$this->email->set_newline('\r\n');
$this->email->from('xxx@163.com','Information');
$this->email->to('xxx@163.com');
$this->email->subject('This is an email test');
$this->email->message('It is working,Great!');
if($this->email->send()){
echo 'Your email was sent';
}
else{
echo $this->email->print_debugger();
}
}
}
xxx@163.com都为正常注册过的email,密码也正确,除了163邮箱,其他邮箱也都试过
一直报错
Unable to load the requested language file: language/ch/email_lang.php

检查很多遍了,没看出究竟,请大家指点
谢谢

SaxonC 发表于 2011-3-10 14:48:47

找到问题了

jeongee 发表于 2011-3-10 15:01:15

Unable to load the requested language file: language/ch/email_lang.php

很明显是你没有ch的语言文件夹,而你又在config.php看到了语言配置项,想当然的把那个english的值给改成ch了。我猜的对吗?

chengh06 发表于 2012-6-27 20:40:15

SaxonC 发表于 2011-3-10 14:48 static/image/common/back.gif
找到问题了

怎么回事呢?
页: [1]
查看完整版本: CI 2.0 发送Email 设置问题,请大家热心帮助