我的要求是在土耳其語發送郵件。 這裏是我的代碼:郵件在土耳其語
$rst2 = $this->selectQry(TBL_MAILSETTING,"mailTypeId='8' AND langId='1'",'0','0');
$query2= $this->getResultRow($rst2);
$subject2 = $query2['mailSubject'];
$subject2 = iconv_mime_decode($subject2, 2, "utf-8");
$subject2 = mb_convert_encoding($subject2, "utf-8","AUTO");
$subject2 = mb_encode_mimeheader($subject2);
$from1 = $_POST['email'];
$query2['message'] = $query2['mailContaint'];
$query2['message']=str_replace("[name]",$_POST[name],$query2['message']);
$message1 = $query2['message'];
mail(
$from1
, $subject2
, "$message1\r\n"
, "From: $from\n"
. "MIME-Version: 1.0\n"
. "Content-type:text/html;charset=iso-8859-1" . "\r\n"
. 'X-Mailer: PHP/' . phpversion()
);
這裏每一件事情進行得很順利,但問題是當被攝體在編碼形式在「evrimii Tebrik Card Designer Takım
」 任何機構可以幫助將讚賞打算爲(Takım爲Takım
)。
你試過'utf-8'或'iso-8859-9'而不是'iso-8859-1'嗎? – Bora
是的,我曾嘗試utf-8,iso-8859-9,iso-8859-1,iso-8859-2,但結果相同。 –
你可以在/etc/php.ini和/etc/php.d/mbstring.ini中檢查這個「mbstring。*」字符串,然後重新啓動apache,它可以幫助 –