Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/259.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发送电子邮件_Php_Sendmail_Arabic - Fatal编程技术网

通过支持阿拉伯语的php发送电子邮件

通过支持阿拉伯语的php发送电子邮件,php,sendmail,arabic,Php,Sendmail,Arabic,我有反馈表。我想用HTML邮件发送内容。当用户输入阿拉伯字符时,它不会正确显示。类似于 PHP代码: function send_email($fromPerson, $fromEmail, $to, $subject, $message) { $headers = "From: $fromPerson<$fromEmail> \n"; $headers .= "Reply-To: $eMail \r\n"; $headers .= "X-Mailer: PH

我有反馈表。我想用HTML邮件发送内容。当用户输入阿拉伯字符时,它不会正确显示。类似于

PHP代码:

function send_email($fromPerson, $fromEmail, $to, $subject, $message) {
    $headers = "From: $fromPerson<$fromEmail> \n";
    $headers .= "Reply-To: $eMail \r\n";
    $headers .= "X-Mailer: PHP/". phpversion();
    $headers .= "X-Priority: 3 \n";
    $headers .= "MIME-version: 1.0\n";
    $headers .= "Content-Type: text/html; charset=UTF-8\n";
    $headers .= "Bcc:log@tazbeta.com\n";
    $msg=$message;
    @mail($to, $subject, $msg, $headers); 

请,有什么想法吗?

在html页面中添加此标题标记:

<html>
<head>
     <meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
</head>
<body>
<form name="feedb" method="post" action="subscribe.php">
...
</form>
</body>

...

在html页面中添加此标题标记:

<html>
<head>
     <meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
</head>
<body>
<form name="feedb" method="post" action="subscribe.php">
...
</form>
</body>

...
有关更多信息,请查看此


有关更多信息,请检查此项

我认为您必须将其添加到phpmailer中

$mail->CharSet = 'UTF-8';       
$mail->Encoding     = "base64";

我想你必须把这个添加到phpmailer中

$mail->CharSet = 'UTF-8';       
$mail->Encoding     = "base64";


在mysql设置中使用utf8\u general\u ci对数据库进行编码。

在mysql设置中使用utf8\u general\u ci对数据库进行编码。

大多数情况下,使用现有的PHP库发送电子邮件更方便、更容易-他们已经以正确的方式实现了这些案例(,)在提交时使用“escape”关键字大多数情况下,使用一个现有的PHP库发送电子邮件更方便、更容易-他们已经以正确的方式实现了这些情况(,)在提交时使用“escape”关键字,而submitI已经将此元标记放在页面的标题中。我现在在HTML表单中添加了另一个,我仍然有相同的错误,你发送电子邮件,这封电子邮件与页面无关。所以你必须将这个html标题添加到我尝试过的电子邮件html($msg)中。它不起作用了。我还尝试回显表单提交的POST变量,并在与mail相同的问题中显示。@Kamal add
print\r($\u POST)
resonse数据到你的问题中你能在你的问题中添加
subscribe.php
的完整源代码吗?我已经在页面的标题中添加了这个meta标记。我现在在HTML表单中添加了另一个,我仍然有相同的错误,你发送电子邮件,这封电子邮件与页面无关。所以你必须将这个html标题添加到我尝试过的电子邮件html($msg)中。它不起作用了。我还尝试回显表单提交的POST变量,并在与mail相同的问题中显示。@Kamal add
print\r($\u POST)将数据回复到你的问题中你能在你的问题中添加
subscribe.php
的完整源代码吗?Assalamu alikoom brorthor khaled.alshama,我在你的网站(ar php.org)上播发了这篇文章。这是一项伟大的工作,愿真主为此奖励你。你能在youtube上做一些如何使用它的教程吗?如果你需要任何帮助,请告诉我——贾扎克·阿拉胡·基兰利生命储蓄。谢谢。阿萨拉木·阿利库姆·布罗瑟尔·哈立德·阿尔沙马,我在你的网站(ar php.org)上播撒种子。这是一项伟大的工作,愿真主为此奖励你。你能在youtube上做一些如何使用它的教程吗?如果你需要任何帮助,请告诉我——贾扎克·阿拉胡·基兰利生命储蓄。谢谢。这应该是一个评论。这应该是一个评论