在 PHP 中转换电子邮件
Contents
[
Hide
]
Aspose.Email - 转换电子邮件消息
要使用 Aspose.Email Java for PHP 转换电子邮件消息,调用 Converter 模块的 convert_eml_to_msg 方法。以下是示例代码。
PHP 代码
public static function convert_eml_to_msg($dataDir=null){
\# Initialize and Load an existing EML file by specifying the MessageFormat
$mailMessage=new MailMessage();
$eml = $mailMessage->load($dataDir . "Message.eml");
\# Save the Email message to disk in Unicode format
$saveOptions=new SaveOptions();
$eml->save($dataDir . "AnEmail.msg", $saveOptions->getDefaultMsgUnicode());
\# Display Status
print "Converted email to msg successfully.".PHP_EOL;
}
下载运行代码
从以下任意提到的社交编码站点下载 转换电子邮件消息 (Aspose.Email):