I am trying to send an email using codeigniter and would like the message to span multiple lines.
$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();
I expect mail to arrive with a line break after βThanks for signing up,β but instead I get
Thank you for registering! n To complete the registration (etc.) ...
I tried with \ r \ n but the result is almost the same:
Thank you for registering! rn Finish (etc.). As if stripslash function was applied.
Any ideas?
source share