// ....
$linebreaks = ["\r\n", "\n", "\r"];
$message = str_replace($linebreaks, PHP_EOL, $message);
mb_send_mail($toEmail, $subject, $message ,
"From: <$fromEmail>\r\n" .
"Content-type: text/plain; charset=utf-8\r\n" .
"X-Mailer: PHP/" . phpversion());
// write success:
echo "OK";