我正在使用 phpmailer 类发送电子邮件。现在,我来自欧洲,所以我们使用了重音字符...但是从我的 php 脚本中处理不好,我不知道为什么..我尝试将很多次从 utf-8 更改为 iso-8859- 1 从我的 html 表单、script.php 和 class.phpmailer.php 反之亦然。(class.phpmailer.php 默认为 iso-8859-1)
//My form.html
...
<form action="script.php" name="contatti" method="POST" accept-charset="ISO-8859-1">
</form>
...
//My script.php
...
require "phpmailer/class.phpmailer.php";
$messaggio = new PHPmailer();
$messaggio->CharSet = "ISO-8859-1";
...
//class.phpmailer.php
...
public $CharSet = 'utf-8';
...
对不起我的英语不好。谢谢!