PHPで PST に MapiJournal を追加
Contents
[
Hide
]
Aspose.Email - PSTへMapiJournalを追加
Aspose.Email Java for PHP を使用して PST に MapiJournal を追加するには、単に AddMapiJournalToPST モジュールを呼び出します。以下にサンプルコードを示します。
PHP コード
$d1 = new Date();
$calendar=new Calendar();
$cl = $calendar->getInstance();
$cl->setTime($d1);
$cl->add($calendar->HOUR, 1);
$d2 = $cl->getTime();
$journal = new MapiJournal("daily record", "called out in the dark", "Phone call", "Phone call");
$journal->setStartTime($d1);
$journal->setEndTime($d2);
$personalStorage=new PersonalStorage();
$fileFormatVersion=new FileFormatVersion();
$pst = $personalStorage->create($dataDir . "JournalPST.pst", $fileFormatVersion->Unicode);
$standardIpmFolder=new StandardIpmFolder();
$journal_folder = $pst->createPredefinedFolder("Journal", $standardIpmFolder->Journal);
$journal_folder->addMapiMessageItem($journal);
print "Added MapiJournal Successfully.".PHP_EOL;
実行コードをダウンロード
以下に記載されたソーシャルコーディングサイトのいずれかから Adding MapiJournal to PST (Aspose.Email) をダウンロードしてください: