我正在使用 Laragon v. 2.2.2 - 开发环境
我尝试发送带有波兰字符"śćńółęśąśżćźó"的邮件,我还添加了正确的标题"Content-type: text/html; charset=UTF-8"和文件编码到邮件,但在 sendmail 输出日志和 gmail 中,邮件看起来比如: "L>A?L"AllL,ATL>AL>LLA?LsAl"。
Sendmail 输出日志:
17.03.31 16:02:58 ** --- MESSAGE BEGIN ---
17.03.31 16:02:58 ** To: ***@gmail.com
17.03.31 16:02:58 ** Subject: test
17.03.31 16:02:58 ** X-PHP-Originating-Script: 0:index.php
17.03.31 16:02:58 ** Content-type: text/html; charset=UTF-8
17.03.31 16:02:58 **
17.03.31 16:02:58 ** śćńółęśąśżćźó
17.03.31 16:02:58 ** --- MESSAGE END ---
17.03.31 16:02:59 >> Date: Fri, 31 Mar 2017 16:02:59 <EOL>
17.03.31 16:02:59 >> To: ***@gmail.com<EOL>
17.03.31 16:02:59 >> Subject: test<EOL>
17.03.31 16:02:59 >> X-PHP-Originating-Script: 0:index.php<EOL>
17.03.31 16:02:59 >> Content-type: text/html; charset=UTF-8<EOL>
17.03.31 16:02:59 >> <EOL>
17.03.31 16:02:59 >> L>A?L"AlL,ATL>A.L>LLA?LsAl<EOL>
17.03.31 16:02:59 >> .<EOL>
PHP代码:
<?php
mail('***@gmail.com', 'test', 'śćńółęśąśżćźó', "Content-type: text/html; charset=UTF-8");
?>
邮件通过 Laragon 电子邮件配置发送(我使用的是 Gmail)
如何解决?