Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/233.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/email/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
PHP邮件函数outlook UTF8_Php_Email_Utf 8_Outlook - Fatal编程技术网

PHP邮件函数outlook UTF8

PHP邮件函数outlook UTF8,php,email,utf-8,outlook,Php,Email,Utf 8,Outlook,我的剧本: $message = " <html> <head> <title>Birthday Reminders for August</title> <style>td,tr{border:solid 1px black;}</style> <meta charset='UTF-8'> </head> <body> <table> <t

我的剧本:

$message = "
<html>
<head>
  <title>Birthday Reminders for August</title>
  <style>td,tr{border:solid 1px black;}</style>
  <meta charset='UTF-8'>
</head>
<body>
  <table>
  <tr><td>სახელი</td><td>{$_POST['firstname']}</td></tr>
  <tr><td>გვარი</td><td>{$_POST['lastname']}</td></tr>
  <tr><td>დაბადების თარიღი</td><td>{$_POST['birthday']}</td></tr>
  <tr><td>მოქალაქეობა</td><td>{$_POST['cityzen']}</td></tr>
  <tr><td>პირადი ნომერი</td><td>{$_POST['id_number']}</td></tr>
  </table>
</body>
</html>
";

// To send HTML mail, the Content-type header must be set
//MUSHA
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; utf-8' . "\r\n";

// Additional headers
$headers .= 'To: Mary <aaa.wwww@gmail.com>, Kelly <kelly@example.com>' . "\r\n";
$headers .= 'From: Birthday Reminder <birthday@example.com>' . "\r\n";
$headers .= 'Cc: birthdayarchive@example.com' . "\r\n";
$headers .= 'Bcc: birthdaycheck@example.com' . "\n";

// Mail it
mail($to, $subject, $message, $headers);
$message=”
八月生日提醒
td,tr{边框:实心1px黑色;}
სახელი{$_POST['firstname']}
გვარი{$\u POST['lastname']}
დაბადების თარიღი{$_POST['birth']}
მოქალაქეობა{$_POST['cityzen']}
პირადი ნომერი{$\u POST['id\u number']}
";
//要发送HTML邮件,必须设置内容类型标题
//穆沙
$headers='MIME版本:1.0'。“\r\n”;
$headers.='内容类型:文本/html;utf-8'。“\r\n”;
//附加标题
$headers.='To:Mary

尝试使用:

$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
尝试添加

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

到php文件的顶部。还有,您使用的是哪一版本的Outlook?

还是同样的问题谢谢$headers。='内容类型:text/html;字符集=utf-8'。“\r\n”;我有过这样那样的经历works@PiraTa是的。您没有注意到,我添加了一个单词:“charset=”我注意到,但您没有注意到,我添加了一个字符:“-”UTF-8:D@PiraTa非常感谢。我更新了答案。编码的名称实际上是utf-8:D。