How can I ensure proper line breaks in the HTML email?

To ensure proper line breaks in an HTML email, you can use the PHP `nl2br()` function to convert newlines to HTML line breaks `<br>`. This function will preserve the line breaks in the email content when it is displayed in an HTML format.

$email_content = &quot;Hello, this is a sample email.\n\nI hope this message finds you well.&quot;;
$email_content_html = nl2br($email_content);

// Now $email_content_html will contain the proper line breaks for HTML email display