|
楼主 |
发表于 2013-7-22 17:38:07
|
显示全部楼层
$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.googlemail.com',
'smtp_port' => 465,
'smtp_user' => 'gmail邮箱',
'smtp_pass' => 'gmail密码',
);
$this->load->library('email', $config);
$this->email->set_newline("\r\n");
$this->email->from('fdsa@fdas.com', 'Ross');
$this->email->to('yjtest0016@163.com');
$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!';
上面是action里代码
|
|