通过Outlook Exchange帐户发送邮件时如何在PHP上设置CharSet

时间:2019-05-17 12:34:07

标签: php mailitem

我可以发送邮件,但是我有字符集问题。

$to="mailadress@domain.com";
$message="some Turkish letters like ğüşiöç";
// starting outlook        
com_load_typelib("outlook.application"); 

if (!defined("olMailItem")) {define("olMailItem",0);}

$outlook_Obj = new COM("outlook.application") or die("Unable to start Outlook");

//just to check you are connected.        
echo "Loaded MS Outlook, version {$outlook_Obj->Version}\n";        
$oMsg = $outlook_Obj->CreateItem(olMailItem);        
$oMsg->Recipients->Add($to);
$oMsg->Subject=$subject;        
$oMsg->Body=$message;
$oMsg->Save();        
$oMsg->Send();   

我收到邮件时。土耳其字符看起来不正确。

0 个答案:

没有答案