【发布时间】:2011-02-15 05:08:58
【问题描述】:
我正在尝试使用 codeigniter 发送电子邮件,并且希望消息跨越多行。
$address = $this->input->post('email');
$subject = 'Please complete your registration';
$message = 'Thanks for registering! \n To complete your registration, please click on (or copy and paste in your browser) the following link: ' . base_url(). "users/confirmRegistration/" . $confirmation_code; //note the '\n' after thanks for registering
$this->load->library('email');
$this->email->from('me@mysite.com', 'myname');
$this->email->to($address);
$this->email->subject($subject);
$this->email->message($message);
$this->email->send();
我希望邮件在“感谢注册”之后会出现换行符,但我得到了
感谢您的注册! n 完成您的注册(等等...)
我用\r\n试过了,结果几乎一样:
感谢您的注册! rn 完成(等等)。这就像应用了一个stripslash函数..
有什么想法吗?
【问题讨论】:
标签: php email codeigniter escaping