New lines (\r\n) are not working in email body
In order to include new lines in the body of an email sent with PHP, you will need to use the proper new line characters.
In order to include new lines in the body of an email sent with PHP, you will need to use the proper new line characters. Email standards (RFC 2822) require \r\n for line breaks, and PHP uses these characters for email formatting.
Here is an example of how you can use new lines in the body of an email:
Example of how to use new lines in the body of an email in PHP
<?php
$to = "[email protected]";
$subject = "Test Email";
$message = "This is a test email.\r\nThis is the second line.\r\nThis is the third line.";
$headers = "From: [email protected]";
mail($to, $subject, $message, $headers);Make sure that you are using the proper new line characters and that you have included the appropriate $headers in your mail() function. If you are still having trouble, you may want to check that your server is configured to send email properly.