Answer the question
In order to leave comments, you need to log in
Problem with encoding in outlook 2016?
Hello! The problem with the encoding in outlook 2016. It comes to mail in gmai, mail, yandex normally. And here in outlook with kryakozyabry. In outlook, I changed the encoding in the settings, it still does not work.
Here is the code:
<?
header('Content-type: text/html; charset=utf-8');
$data = json_decode(file_get_contents("php://input"), true);
// Get data from the form
$subject = "Product order: " . $data["prodName"] . " Vendor code: " . $data["prodsku"];
$message = "From: ".$data["customerName"]."\r\n";
$message .= "Phone: ".$data["customerPhone"]."\r\n";
$message .= "Message subject: ". $subject."
$HTTP_HOST = parse_url('http://'.$_SERVER["HTTP_HOST"]);
$HTTP_HOST = str_replace(array("http://","www."),"", $HTTP_HOST['host']);
$from = "[email protected]".$HTTP_HOST;
// Basic settings for sending a message
$mailto = $data['sellerEmail']; // recipient's email
$content = "text/html"; // data type (text)
$charset = "utf-8"; // message encoding
$lang = $data['locale']; // language
$alert = array(
'ru_RU' => array(
'statusSuccess' => 'Thank you for your order, it has been successfully received!',
'statusErrorServer' => 'Server error occurred',
),
'
'statusErrorServer' => 'Server pardoned',
)
);
if(!empty($data)) {
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: $content" . "; charset=$charset\r\n";
$headers .= "Date: ".date("Ymd (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'] . '
Answer the question
In order to leave comments, you need to log in
Auto-select encoding is enabled and somewhere in the header there are apparently characters by which the encoding is not correctly determined, first disable auto-select encoding
here: https://social.technet.microsoft.com/Forums/office...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question