Problem with encoding in outlook 2016?

Hello! Problem with encoding in outlook 2016. Mail in gmai, mail, yandex comes normally. But in outlook krakozyabry. In outlook, changed the encoding in the settings, still not rabotaet.
Here is the code:

header('Content-type: text/html; charset=utf-8');

$data = json_decode(file_get_contents("php://input"), true);

// Get data from form
$subject = "Ordering of goods" . $data["prodName"] . "Article:" . $data["prodSku"];
$message = "From: ".$data["customerName"]."\r\n";
$message .= "Phone: ".$data["customerPhone"]."\r\n";
$message .= "Subject: ". $subject ."\r\n======================\r\n";
$message .= "Quantity:" . $data["prodCount"];

$HTTP_HOST = parse_url('http://'.$_SERVER["HTTP_HOST"]);
$HTTP_HOST = str_replace(array("http://","www."),"", $HTTP_HOST['host']);
$from = "noreply@".$HTTP_HOST;

// Basic setup sending a message
$mailto = $data['sellerEmail']; // e-mail recipient
$content = "text/html"; // data type (text)
$charset = "utf-8"; // message encoding
$lang = $data['locale']; // language
$alert = array(
'ru_RU' => array(
'statusSuccess' => 'Thanks for Your order received successfully!',
'statusErrorServer' => 'an error Occurred with the Server',
),
'uk_UA' => array(
'statusSuccess' => 'Thank you for Your zamovlennya, vono uspsa prineto!',
'statusErrorServer' => 'Talasa pomilka Server',
)
);

if(!empty($data)) {
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: $content" . "; charset=$charset\r\n";
$headers .= "Date: ".date("Y-m-d (H:i:s)",time())."\r\n";
$headers .= "From: MagentoShop ". $from ."\r\n";

if (mail($mailto, $subject, $message)) {
echo '{"status":"1","message":"' . $alert[$lang]['statusSuccess'] . '"}';
} else {
echo '{"status":"0","message":"' . $alert[$lang]['statusErrorServer'] . '"}';
}

}
?>
June 3rd 19 at 20:57
1 answer
June 3rd 19 at 20:59
Enabled the auto-detect encoding, and somewhere in the title, apparently the characters that are not the right defines the encoding to start off the auto select encoding
here's another: https://social.technet.microsoft.com/Forums/office...
I'm a novice. And I don't know how to disable the automatic encoding( - Brain_Quigl commented on June 3rd 19 at 21:02
first we must learn to follow links and read what is written there. - Henderson_Beat commented on June 3rd 19 at 21:05
For the link all done. But nothing. - Brain_Quigl commented on June 3rd 19 at 21:08
need to watch what comes in what form - Henderson_Beat commented on June 3rd 19 at 21:11

Find more questions by tags PHPOutlookHTML