我尝试使用CodeIgniter邮件功能来传输联系表单的详细信息,但是当我发送时,我无法发送任何HTML内容,它中断了。
这是我通过电子邮件output获得的输出
我已经试过这个代码
public function send_mail() {
$to = "test@test.com";
$fname = $this->input->post('fname');
$lname = $this->input->post('lname');
$email = $this->input->post('email');
$phone = $this->input->post('phone');
$esubject = $this->input->post('esubject');
$msg = $this->input->post('msg');
$ip= $_SERVER['REMOTE_ADDR'];
$this->load->library('email');
//echo $fname.'<br>'.$lname.'<br>'.$email.'<br>'.$phone.'<br>'.$esubject.'<br>'.$msg; exit;
$this->email->from($email);
$this->email->to($to);
$this->email->subject(' Contact Form');
$this->email->message($fname.'<br>'.$lname.'<br>'.$email.
'<br>'.$phone.'<br>'.$esubject.'<br>'.$msg.$ip);
//Send mail
// $this->load->library('session');
if($this->email->send())
{
echo 'Email send.';
}
else
{
show_error($this->email->print_debugger());
}
$this->load->view('contact');
}
1条答案
按热度按时间uqzxnwby1#
为我工作