ایجاد PST جدید در Python
Contents
[
Hide
]
Aspose.Email - ایجاد PST جدید
برای ایجاد PST جدید با استفاده از Aspose.Email Java for Python، کد زیر را استفاده کنید.
کد Python
\# Create an instance of PersonalStorage
personalStorage = self.PersonalStorage
pst = personalStorage.create(self.dataDir + "sample1.pst", 0)
\# Create a folder at root of pst
pst.getRootFolder().addSubFolder("myInbox")
\# Add message to newly created folder
mapi_message = self.MapiMessage
pst.getRootFolder().getSubFolder("myInbox").addMessage(mapi_message.fromFile(self.dataDir + "Message.msg"))
print "Created PST successfully."
بارگیری کد اجرایی
فایل Create New PST (Aspose.Email) را از هر یک از سایتهای کدگذاری اجتماعی زیر دانلود کنید: