sogo wrote:I did come across nl2br but I am only sending plain text emails. nl2br has the same effect as when I put \n in the text field. <br/> gets printed in the email message. I did put in a markers like <-br-> in the text and used str_replace to put in the stolen \n quite successfully. But it dont feel good 🙁
Without setting the header for a html email, the <br> will be displayed literally. Use the nl2br function to convert you newline characters to html breaks, then set a header and pass it to the mail function
$headers = "Content-type: text/html; charset=iso-8859-1\n";
mail($to_email, $subject, $body, $headers);