|
报错::
电子邮件()的[function.mail]:在“localhost”的25端口无法连接到邮件服务器,验证您的“SMTP”和“smtp_port”的设定在php.ini或使用手册中ini_set()
email.php
$config['protocol'] = 'SMTP';
$config['smtp_host'] = 'smtp.163.com';
$config['smtp_user'] = 'xxxxxxx@163.com';
$config['smtp_pass'] = 'xxxxxxxxxx';
$config['mailtype'] = 'html';
$config['validate'] = true;
$config['priority'] = 1;
$config['wordwrap'] = TRUE;
$config['charset'] = 'utf-8';
class Message extends CI_Controller{
public function index(){
$this->load->library('email');
//$this->email->initialize($config);
$this->email->from('xxxxx@163.com', '管理员');
$this->email->to('xxxxxx@qq.com');
$this->email->subject('Email Test');
$this->email->message('Testing the email class.');
$this->email->send();
//echo $this->email->print_debugger();
}
}
这都没错,而且去看163.qq的 SMTP都是开着的,为什么会报这样的错,求解.谢谢.
[img]file:///C:\Users\admin\AppData\Roaming\Tencent\Users\252069993\QQ\WinTemp\RichOle\M9N%[J22IA6EB@QYIX6(LEH.jpg[/img]
[img]file:///C:\Users\admin\AppData\Roaming\Tencent\Users\252069993\QQ\WinTemp\RichOle\M9N%[J22IA6EB@QYIX6(LEH.jpg[/img]
|
|