Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/email/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Codeigniter 在xampp中测试php发送电子邮件验证时遇到问题_Codeigniter_Email_Xampp - Fatal编程技术网

Codeigniter 在xampp中测试php发送电子邮件验证时遇到问题

Codeigniter 在xampp中测试php发送电子邮件验证时遇到问题,codeigniter,email,xampp,Codeigniter,Email,Xampp,我必须写一个网站的登录,注册和限制成员功能,我一切都可以,但我不能测试发送验证电子邮件,但也需要。查看它是否发送并测试电子邮件中的验证链接 我经营的是宏碁Aspire 5920 Ubuntu 12.04 Xampp 1.8.1 Codeigniter 2.1.3在回答我自己的问题时,我需要传递配置xampp以发送电子邮件的信息: $config = Array( 'protocol' => 'smtp', 'smtp_host' => 'ssl://smtp.googlemail.c

我必须写一个网站的登录,注册和限制成员功能,我一切都可以,但我不能测试发送验证电子邮件,但也需要。查看它是否发送并测试电子邮件中的验证链接

我经营的是宏碁Aspire 5920

Ubuntu 12.04

Xampp 1.8.1


Codeigniter 2.1.3

在回答我自己的问题时,我需要传递配置xampp以发送电子邮件的信息:

$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.googlemail.com',
'smtp_port' => 465,
'smtp_user' => 'gmail.login@googlemail.com',
'smtp_pass' => 'your_password',
);
$this->load->library('email', $config);
$this->email->set_newline("\r\n");

$this->email->from('gmail.login@googlemail.com', 'Your Name');
$this->email->to('recipient@destination.tld');

$this->email->subject(' CodeIgniter Rocks Socks ');
$this->email->message('Hello World');


if (!$this->email->send()){
    show_error($this->email->print_debugger());
}else{
    echo 'Your e-mail has been sent!'; 
}