Codeigniter 在xampp中测试php发送电子邮件验证时遇到问题
我必须写一个网站的登录,注册和限制成员功能,我一切都可以,但我不能测试发送验证电子邮件,但也需要。查看它是否发送并测试电子邮件中的验证链接 我经营的是宏碁Aspire 5920 Ubuntu 12.04 Xampp 1.8.1Codeigniter 在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
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!';
}