Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/80.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
HTML邮件无法正常工作(ä;ö;ü;未正确传输到outlook)_Html_Outlook_Mailto_Utf - Fatal编程技术网

HTML邮件无法正常工作(ä;ö;ü;未正确传输到outlook)

HTML邮件无法正常工作(ä;ö;ü;未正确传输到outlook),html,outlook,mailto,utf,Html,Outlook,Mailto,Utf,当我把字母“üäö”写进我的表格并按submit时,outlook中反而出现了“ü÷Ô。我的代码有什么问题。我在脑海中定义了UTF-8。还有什么办法解决这个问题 <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Bestellungen</title> <link rel="stylesheet" type="text/cs

当我把字母“üäö”写进我的表格并按submit时,outlook中反而出现了“ü÷Ô。我的代码有什么问题。我在脑海中定义了UTF-8。还有什么办法解决这个问题

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Bestellungen</title>
<link rel="stylesheet" type="text/css" href="view.css" media="all">
</head>

<body id="main_body" >  

<form action="MAILTO:mail@mail.ch?subject=DeinBetreff" method="post" enctype="text/plain">  

贝斯特伦根

这个问题来自HTML

事实上,HTML在特殊字符方面存在问题


使用它:ü=ý,ä=ä和ö=ö。

我还没有测试过这一点,但这应该适合您:

更新:

测试和工作

HTML:


联系方式
姓名:
城市:
电邮:
信息:
PHP:



我不能用这个。因为用户必须填写表格,然后用ü,ö,ä书写。。有没有办法解决这个问题?但如果是用户提交的呢?您不能要求用户这样做。大概OP需要通过PHP进行某种字符串替换?我不能将PHP代码写入我的文件,因为它是一个.tpl文件,不允许使用PHP代码。好吧,您需要创建函数来存储特殊字符。(插入基)数据编码函数-Utf8_编码->在Utf8中编码特殊字符和国际字符-Htmlspecialchars(ENT_引号)->编码HTML字符解码数据的函数(恢复数据库)-Utf8_解码->恢复特殊字符和国际字符进行治疗-Htmlspecialchars_解码(ENT_引号)->解码除引号和撇号之外的HTML字符如果你用准确的代码来回答我的文章,那将是一个很大的帮助,因为我并不真正喜欢PHP/HTML编码。所以我不明白你的意思
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Contact Form</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<form method="post" action="contactengine.php">
<label for="Name">Name:</label>
<input type="text" name="Name" />
<label for="City">City:</label>
<input type="text" name="City" />
<label for="Email">Email:</label>
<input type="text" name="Email" />
<label for="Message">Message:</label>
<textarea name="Message" rows="20" cols="20"></textarea>
<input type="submit" name="submit" value="Submit" class="submit-button" />
</form>
</body>
</html>
<?php
$EmailFrom = "example@example.com";
$EmailTo = "example@example.com";
$Subject = "subject";
$Name = Trim(stripslashes($_POST['Name'])); 
$City = Trim(stripslashes($_POST['City'])); 
$Email = Trim(stripslashes($_POST['Email'])); 
$Message = Trim(stripslashes($_POST['Message'])); 
$Body = "";
$Body .= "Name: ";
$Body .= $Name;
$Body .= "\n";
$Body .= "City: ";
$Body .= $City;
$Body .= "\n";
$Body .= "Email: ";
$Body .= $Email;
$Body .= "\n";
$Body .= "Message: ";
$Body .= $Message;
$Body .= "\n";
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>\r\n" . "MIME-Version: 1.0\r\n" . "Content-Type: text/plain; charset=utf-8");
?>