Konwertowanie wiadomości e-mail w PHP

Aspose.Email - Konwertowanie wiadomości e-mail

Aby skonwertować wiadomości e-mail przy użyciu Aspose.Email Java for PHP, wywołaj metodę convert_eml_to_msg modułu Converter. Poniżej znajduje się przykładowy kod.

Kod 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;

}

Pobierz działający kod

Pobierz Converting Email Messages (Aspose.Email) z dowolnej z poniżej wymienionych platform kodowania społecznego: