下表为发送邮件时所有可用的参数。
public function email(){ $this->load->library('email'); $config['protocol'] = 'smtp'; $config['smtp_host'] = 'smtp.163.com'; $config['smtp_user'] = 'helloworld_assad@163.com'; $config['smtp_pass'] = "*********"; //填写邮箱的 SMTP/POP 等的授权码 $config['smtp_port'] = 25; $config['charset'] = 'utf-8'; $config['smtp_timeout'] = 30; $config['mailtype'] = 'text'; $config['validate'] = TRUE; $config['wordwrap'] = TRUE; $config['crlf'] = '\r\n'; $config['newline'] = '\r\n'; $this->email->initialize($config); $this->email->from('helloworld_assad@163.com','assad'); $this->email->to('yulinying_1994@outlook.com'); $this->email->subject('Email Test'); $this->email->message("This is a eamil just testing the CI class"); if($this->email->send()){ echo 'the email is sent'; }else{ echo 'email sent fail'; } }{unwrap}http://example.com/a_long_link_that_should_not_be_wrapped.html{/unwrap}
echo $this->email->print_debugger();
604



被折叠的 条评论
为什么被折叠?



