How can line breaks in emails be controlled when using PHP's mail function?

When using PHP's mail function to send emails, line breaks can be controlled by using the "\r\n" sequence to indicate a new line. This ensures that the email content is formatted correctly with proper line breaks.

$to = "recipient@example.com";
$subject = "Test Email";
$message = "Hello,\r\nThis is a test email.\r\nRegards,";
$headers = "From: sender@example.com\r\n";

mail($to, $subject, $message, $headers);