How can line breaks and empty lines be properly formatted in PHP to display correctly in Outlook emails?

Line breaks and empty lines in PHP can be properly formatted in Outlook emails by using the PHP_EOL constant to insert line breaks and "\r\n" to insert empty lines. This ensures that the email content is displayed correctly in Outlook.

$message = "Hello, this is a line of text." . PHP_EOL;
$message .= "This is another line of text." . PHP_EOL . PHP_EOL;
$message .= "This is an empty line." . "\r\n";
$message .= "This is another line of text after an empty line.";

// Use $message variable in the email body