我想使用电子邮件类(CodeIgniter)发送电子邮件问题是这样的 电子邮件以文本格式发送如此简单...... 我想设计带有(html,表格和颜色)的电子邮件或使用CodeIgniter进行电子邮件发送的高级方式。
答案 0 :(得分:3)
function signup(){
#stripped out the validation code
#stripped out the db insert code
$data = array(
'some_var_for_view'=>'Some Value for View'
);
$htmlMessage = $this->parser->parse('user/email/signup_html', $data, true);
$txtMessage = $this->parser->parse('user/email/signup_txt', $data, true);
#send the message
$this->email->from('test@webdevkungfu.com', 'CSSNinja');
$this->email->to($this->input->post('email_address'));
$this->email->subject('Account Registration Confirmation');
$this->email->message($htmlMessage);
$this->email->alt_message($txtMessage);
$this->email->send();
}
我的问题现在通过以下链接找到的代码解决了
http://www.webdevkungfu.com/email-templates-with-codeigniter/