diff --git a/Plugins/Aspose.Email Java for Python/ProgrammingEmail/__init__.py b/Plugins/Aspose.Email Java for Python/ProgrammingEmail/__init__.py new file mode 100644 index 0000000..7d3b65b --- /dev/null +++ b/Plugins/Aspose.Email Java for Python/ProgrammingEmail/__init__.py @@ -0,0 +1,307 @@ +__author__ = 'fahadadeel' +import jpype + +class Converter: + + def __init__(self,dataDir): + + self.dataDir = dataDir + self.MailMessage = jpype.JClass("com.aspose.email.MailMessage") + self.SaveOptions = jpype.JClass("com.aspose.email.SaveOptions") + + def main(self): + + # Initialize and Load an existing EML file by specifying the MessageFormat + mailMessage = self.MailMessage + eml = mailMessage.load(self.dataDir + "Message.eml") + + # Save the Email message to disk in Unicode format + saveOptions= self.SaveOptions + eml.save(self.dataDir + "AnEmail.msg", saveOptions.getDefaultMsgUnicode()) + + # Display Status + print "Converted email to msg successfully." + +class CreateNewEmail: + + def __init__(self,dataDir): + + self.dataDir = dataDir + self.MailMessage = jpype.JClass("com.aspose.email.MailMessage") + self.MailAddress = jpype.JClass("com.aspose.email.MailAddress") + self.MailMessageSaveType = jpype.JClass("com.aspose.email.MailMessageSaveType") + + def main(self): + + # Create a instance of MailMessage class + message = self.MailMessage() + + # Set subject of the message + message.setSubject("New message created by Aspose.Email for Java") + + mail_address = self.MailAddress + + # Set Html body + message.setHtmlBody("This line is in bold.

" + + "This line is in blue color") + + # Set sender information + message.setFrom(self.MailAddress("from@domain.com", "Sender Name", False)) + + # Add TO recipients + message.getTo().addMailAddress(self.MailAddress("to1@domain.com", "Recipient 1", False)) + message.getTo().addMailAddress(self.MailAddress("to2@domain.com", "Recipient 2", False)) + + # Add CC recipients + message.getCC().addMailAddress(self.MailAddress("cc1@domain.com", "Recipient 3", False)) + message.getCC().addMailAddress(self.MailAddress("cc2@domain.com", "Recipient 4", False)) + + # Save message in EML and MSG formats + mail_message_save_type = self.MailMessageSaveType + message.save(self.dataDir + "Message.eml", mail_message_save_type.getEmlFormat()) + message.save(self.dataDir + "Message.msg", mail_message_save_type.getOutlookMessageFormat()) + # Display Status + print "Created email messages Successfully." + +class CustomizeEmailHeaders: + + def __init__(self,dataDir): + + self.dataDir = dataDir + self.MailMessage = jpype.JClass("com.aspose.email.MailMessage") + self.MailAddress = jpype.JClass("com.aspose.email.MailAddress") + self.MessageFormat = jpype.JClass("com.aspose.email.MessageFormat") + self.TimeZone = jpype.JClass("java.util.TimeZone") + self.Calendar = jpype.JClass("java.util.Calendar") + + def main(self): + + # Create a instance of MailMessage class + message = self.MailMessage() + + # Set subject of the message + message.setSubject("New message created by Aspose.Email for Java") + + # Set Html body + message.setHtmlBody("This line is in bold.

" + + "This line is in blue color") + + # Set sender information + message.setFrom(self.MailAddress("from@domain.com", "Sender Name", False)) + + # Add TO recipients + message.getTo().addMailAddress(self.MailAddress("to@domain.com", "Recipient 1", False)) + + # Message subject + message.setSubject("Customizing Email Headers") + + # Specify Date + timeZone = self.TimeZone + calendar = self.Calendar + calendar = calendar.getInstance(timeZone.getTimeZone("GMT")) + + date = calendar.getTime() + message.setDate(date) + + # Specify XMailer + message.setXMailer("Aspose.Email") + + # Specify Secret Header + message.getHeaders().add("secret-header", "mystery") + + # Save message to disc + messageFormat= self.MessageFormat + message.save(self.dataDir + "MsgHeaders.msg", messageFormat.getMsg()) + + # Display Status + print "Customized message headers Successfully." + +class GetEmailInfo: + + def __init__(self,dataDir): + + self.dataDir = dataDir + self.MailMessage = jpype.JClass("com.aspose.email.MailMessage") + self.MessageFormat = jpype.JClass("com.aspose.email.MessageFormat") + self.MailAddress = jpype.JClass("com.aspose.email.MailAddress") + self.MailMessageSaveType = jpype.JClass("com.aspose.email.MailMessageSaveType") + + def main(self): + + # Create MailMessage instance by loading an Eml file + message_format = self.MessageFormat + mailMessage = self.MailMessage + message = mailMessage.load(self.dataDir + "Message.eml") + + print "From: " + print message.getFrom() + + print "To: " + print message.getTo() + + print "Subject: " + print message.getSubject() + + print "HtmlBody: " + print message.getHtmlBody() + + print "TextBody: " + print message.getTextBody() + +class ManageAttachments: + + def __init__(self,dataDir): + + self.dataDir = dataDir + self.MailMessage = jpype.JClass("com.aspose.email.MailMessage") + self.MailAddress = jpype.JClass("com.aspose.email.MailAddress") + self.Attachment = jpype.JClass("com.aspose.email.Attachment") + self.MessageFormat = jpype.JClass("com.aspose.email.MessageFormat") + + def main(self): + + # Create a instance of MailMessage class + message = self.MailMessage() + + # Set subject of the message + message.setSubject("New message created by Aspose.Email for Java") + + mail_address = self.MailAddress + + # Set Html body + message.setHtmlBody("This line is in bold.

" + + "This line is in blue color") + + # Set sender information + message.setFrom(self.MailAddress("from@domain.com", "Sender Name", False)) + + # Add TO recipients + message.getTo().addMailAddress(self.MailAddress("to1@domain.com", "Recipient 1", False)) + + # Adding attachment + # Load an attachment + + attachment = self.Attachment(self.dataDir + "1.txt") + + # Add attachment in instance of MailMessage class + message.addAttachment(attachment) + + # Save message to disc + messageFormat = self.MessageFormat + message.save(self.dataDir + "Add-Attachment.msg", messageFormat.getMsg()) + + # Display Status + print "Added attachment successfully." + +class SaveMessageAsDraft: + + def __init__(self,dataDir): + + self.dataDir = dataDir + self.MailMessage = jpype.JClass("com.aspose.email.MailMessage") + self.MapiMessage = jpype.JClass("com.aspose.email.MapiMessage") + self.MailAddress = jpype.JClass("com.aspose.email.MailAddress") + self.Attachment = jpype.JClass("com.aspose.email.Attachment") + self.MessageFormat = jpype.JClass("com.aspose.email.MessageFormat") + self.MapiMessageFlags = jpype.JClass("com.aspose.email.MapiMessageFlags") + + def main(self): + + # Create a instance of MailMessage class + message = self.MailMessage() + + # Set subject of the message + message.setSubject("New message created by Aspose.Email for Java") + + mail_address = self.MailAddress + + # Set Html body + message.setHtmlBody("This line is in bold.

" + + "This line is in blue color") + + # Set sender information + message.setFrom(self.MailAddress("from@domain.com", "Sender Name", False)) + + # Add TO recipients + message.getTo().addMailAddress(self.MailAddress("to1@domain.com", "Recipient 1", False)) + message.getTo().addMailAddress(self.MailAddress("to2@domain.com", "Recipient 2", False)) + + # Create an instance of MapiMessage and load the MailMessag instance into it + mapiMessage = self.MapiMessage + mapi_msg = mapiMessage.fromMailMessage(message) + + # Set the MapiMessageFlags as UNSENT and FROMME + mapi_message_flags = self.MapiMessageFlags + + # Save the MapiMessage to disk + mapi_msg.save(self.dataDir + "New-Draft.msg") + + # Display Status + print "Draft saved Successfully." + +class UpdateEmail: + + def __init__(self,dataDir): + + self.dataDir = dataDir + self.MailMessage = jpype.JClass("com.aspose.email.MailMessage") + self.MailAddress = jpype.JClass("com.aspose.email.MailAddress") + self.Attachment = jpype.JClass("com.aspose.email.Attachment") + self.MessageFormat = jpype.JClass("com.aspose.email.MessageFormat") + self.MailAddressCollection = jpype.JClass("com.aspose.email.MailAddressCollection") + self.MailMessageSaveType = jpype.JClass("com.aspose.email.MailMessageSaveType") + + def main(self): + + # Initialize and Load an existing MSG file by specifying the MessageFormat + mailMessage = self.MailMessage + email = mailMessage.load(self.dataDir + "Message.msg") + + # Initialize a String variable to get the Email Subject + subject = email.getSubject() + + # Append some more information to Subject + subject = subject + " This text is added to the existing subject" + + # Set the Email Subject + email.setSubject('This text is added to the existing subject') + + # Initialize a String variable to get the Email's HTML Body + body = email.getHtmlBody() + + # Apppend some more information to the Body variable + body = body + "
This text is added to the existing body" + + # Set the Email Body + email.setHtmlBody(body) + + # Initialize MailAddressCollection object + contacts = self.MailAddressCollection() + + # Retrieve Email's TO list + contacts = email.getTo() + + # Add another email address to collection + contacts.add("to1@domain.com") + + # Set the collection as Email's TO list + email.setTo(contacts) + + # Initialize MailAddressCollection + contacts = self.MailAddressCollection() + + # Retrieve Email's CC list + contacts = email.getCC() + + # Add another email address to collection + contacts.add("cc2@domain.com") + + # Set the collection as Email's CC list + email.setCC(contacts) + + # Save the Email message to disk by specifying the MessageFormat + mailMessageSaveType = self.MailMessageSaveType + email.save(self.dataDir + "UpdateMessage.msg", mailMessageSaveType.getOutlookMessageFormat()) + + # Display Status + print "Updated email message Successfully." \ No newline at end of file diff --git a/Plugins/Aspose.Email Java for Python/ProgrammingEmail/__init__.pyc b/Plugins/Aspose.Email Java for Python/ProgrammingEmail/__init__.pyc new file mode 100644 index 0000000..84d8103 Binary files /dev/null and b/Plugins/Aspose.Email Java for Python/ProgrammingEmail/__init__.pyc differ diff --git a/Plugins/Aspose.Email Java for Python/ProgrammingOutlook/__init__.py b/Plugins/Aspose.Email Java for Python/ProgrammingOutlook/__init__.py new file mode 100644 index 0000000..281b92c --- /dev/null +++ b/Plugins/Aspose.Email Java for Python/ProgrammingOutlook/__init__.py @@ -0,0 +1,622 @@ +__author__ = "nhp09" +__date__ = "Feb 22, 2016 12:11:58 PM" +import jpype + +class AddFileToPST: + + def __init__(self,dataDir): + + self.dataDir = dataDir + self.MailMessage = jpype.JClass("com.aspose.email.PersonalStorage") + self.FileFormatVersion = jpype.JClass("com.aspose.email.FileFormatVersion") + self.StandardIpmFolder = jpype.JClass("com.aspose.email.StandardIpmFolder") + self.PersonalStorage = jpype.JClass("com.aspose.email.PersonalStorage") + + + def main(self): + + personalStorage = self.PersonalStorage + fileFormatVersion = self.FileFormatVersion + pst = personalStorage.create(self.dataDir + "AddFile1.pst", fileFormatVersion.Unicode) + + standardIpmFolder = self.StandardIpmFolder + fi = pst.createPredefinedFolder("Inbox", standardIpmFolder.Inbox) + + fi.addFile(self.dataDir + "Report.xlsx", "IPM.Document.Excel.Sheet.8") + + pst.dispose() + + print "Added file to PST" + +class AddMapiContactToPST: + + def __init__(self,dataDir): + + self.dataDir = dataDir + self.MapiContact = jpype.JClass("com.aspose.email.MapiContact") + self.MapiContactNamePropertySet = jpype.JClass("com.aspose.email.MapiContactNamePropertySet") + self.MapiContactGender = jpype.JClass("com.aspose.email.MapiContactGender") + self.MapiContactProfessionalPropertySet = jpype.JClass("com.aspose.email.MapiContactProfessionalPropertySet") + self.MapiContactElectronicAddress = jpype.JClass("com.aspose.email.MapiContactElectronicAddress") + self.MapiContactTelephonePropertySet = jpype.JClass("com.aspose.email.MapiContactTelephonePropertySet") + self.FileFormatVersion = jpype.JClass("com.aspose.email.FileFormatVersion") + self.PersonalStorage = jpype.JClass("com.aspose.email.PersonalStorage") + self.StandardIpmFolder = jpype.JClass("com.aspose.email.StandardIpmFolder") + + def main(self): + + # Create an instance of MapiContact + mapi_contact = self.MapiContact() + + # Contact #1 + contact1 = self.MapiContact("Sebastian Wright", "SebastianWright@dayrep.com") + + # Contact #2 + contact2 = self.MapiContact("Wichert Kroos", "WichertKroos@teleworm.us", "Grade A Investment") + + # Contact #3 + contact3 = self.MapiContact("Christoffer van de Meeberg", "ChristoffervandeMeeberg@teleworm.us", "Krauses Sofa Factory", "046-630-4614") + + # Contact #4 + contact4 = self.MapiContact() + contact4.setNameInfo(self.MapiContactNamePropertySet("Margaret", "J.", "Tolle")) + + mapiContactGender = self.MapiContactGender + + contact4.getPersonalInfo().setGender(mapiContactGender.Female) + contact4.setProfessionalInfo(self.MapiContactProfessionalPropertySet("Adaptaz", "Recording engineer")) + contact4.getPhysicalAddresses().getWorkAddress().setAddress("4 Darwinia Loop EIGHTY MILE BEACH WA 6725") + contact4.getElectronicAddresses().setEmail1(self.MapiContactElectronicAddress("Hisen1988", "SMTP", "MargaretJTolle@dayrep.com")) + contact4.getTelephones().setBusinessTelephoneNumber("(08)9080-1183") + contact4.getTelephones().setMobileTelephoneNumber("(925)599-3355") + + # Contact #5 + contact5 = self.MapiContact() + contact5.setNameInfo(self.MapiContactNamePropertySet("Matthew", "R.", "Wilcox")) + contact5.getPersonalInfo().setGender(mapiContactGender.Male) + contact5.setProfessionalInfo(self.MapiContactProfessionalPropertySet("Briazz", "Psychiatric aide")) + contact5.getPhysicalAddresses().getWorkAddress().setAddress("Horner Strasse 12 4421 SAASS") + contact5.getTelephones().setBusinessTelephoneNumber("0650 675 73 30") + contact5.getTelephones().setHomeTelephoneNumber("(661)387-5382") + + # Contact #6 + contact6 = self.MapiContact() + contact6.setNameInfo(self.MapiContactNamePropertySet("Bertha", "A.", "Buell")) + contact6.setProfessionalInfo(self.MapiContactProfessionalPropertySet("Awthentikz", "Social work assistant")) + contact6.getPersonalInfo().setPersonalHomePage("B2BTies.com") + contact6.getPhysicalAddresses().getWorkAddress().setAddress("Im Astenfeld 59 8580 EDELSCHROTT") + contact6.getElectronicAddresses().setEmail1(self.MapiContactElectronicAddress("Experwas", "SMTP", "BerthaABuell@armyspy.com")) + contact6.setTelephones(self.MapiContactTelephonePropertySet("06605045265")) + + personalStorage = self.PersonalStorage + fileFormatVersion = self.FileFormatVersion + standardIpmFolder = self.StandardIpmFolder + + pst = personalStorage.create(self.dataDir + "MapiContactToPST1.pst", fileFormatVersion.Unicode) + contactFolder = pst.createPredefinedFolder("Contacts", standardIpmFolder.Contacts) + contactFolder.addMapiMessageItem(contact1) + contactFolder.addMapiMessageItem(contact2) + contactFolder.addMapiMessageItem(contact3) + contactFolder.addMapiMessageItem(contact4) + contactFolder.addMapiMessageItem(contact5) + contactFolder.addMapiMessageItem(contact6) + + print "Added MapiContacts Successfully." + + +class AddMapiJournalToPST: + + def __init__(self,dataDir): + + self.dataDir = dataDir + self.MapiJournal = jpype.JClass("com.aspose.email.MapiJournal") + self.PersonalStorage = jpype.JClass("com.aspose.email.PersonalStorage") + self.FileFormatVersion = jpype.JClass("com.aspose.email.FileFormatVersion") + self.StandardIpmFolder = jpype.JClass("com.aspose.email.StandardIpmFolder") + + self.Date = jpype.JClass("java.util.Date") + self.Calendar = jpype.JClass("java.util.Calendar") + + def main(self): + + d1 = self.Date() + calendar = self.Calendar + cl = calendar.getInstance() + cl.setTime(d1) + cl.add(calendar.HOUR, 1) + d2 = cl.getTime() + + journal = self.MapiJournal("daily record", "called out in the dark", "Phone call", "Phone call") + journal.setStartTime(d1) + journal.setEndTime(d2) + + personalStorage = self.PersonalStorage + fileFormatVersion = self.FileFormatVersion + pst = personalStorage.create(self.dataDir + "JournalPST.pst", fileFormatVersion.Unicode) + + standardIpmFolder = self.StandardIpmFolder + + journal_folder = pst.createPredefinedFolder("Journal", standardIpmFolder.Journal) + journal_folder.addMapiMessageItem(journal) + + print "Added MapiJournal Successfully." + +class AddMapiNoteToPST: + + def __init__(self,dataDir): + + self.dataDir = dataDir + self.MapiMessage = jpype.JClass("com.aspose.email.MapiMessage") + self.NoteColor = jpype.JClass("com.aspose.email.NoteColor") + self.PersonalStorage = jpype.JClass("com.aspose.email.PersonalStorage") + self.FileFormatVersion = jpype.JClass("com.aspose.email.FileFormatVersion") + self.StandardIpmFolder = jpype.JClass("com.aspose.email.StandardIpmFolder") + + def main(self): + + mapiMessage = self.MapiMessage + mess = mapiMessage.fromFile(self.dataDir + "MapiNote.msg") + + # Note #1 + note1 = mess.toMapiMessageItem() + note1.setSubject("Yellow color note") + note1.setBody("This is a yellow color note") + + # Note #2 + note2 = mess.toMapiMessageItem() + note2.setSubject("Pink color note") + note2.setBody("This is a pink color note") + + noteColor = self.NoteColor + + note2.setColor(noteColor.Pink) + noteColor + + + # Note #3 + note3 = mess.toMapiMessageItem() + note2.setSubject("Blue color note") + note2.setBody("This is a blue color note") + note2.setColor(noteColor.Blue) + note3.setHeight(500) + note3.setWidth(500) + + personalStorage = self.PersonalStorage() + fileFormatVersion = self.FileFormatVersion() + + pst = personalStorage.create(self.dataDir + "MapiNoteToPST.pst", fileFormatVersion.Unicode) + + standardIpmFolder = self.StandardIpmFolder() + + notes_folder = pst.createPredefinedFolder("Notes", standardIpmFolder.Notes) + notes_folder.addMapiMessageItem(note1) + notes_folder.addMapiMessageItem(note2) + notes_folder.addMapiMessageItem(note3) + + print "Added MapiNote Successfully." + +class AddMapiTaskToPST: + + def __init__(self,dataDir): + + self.dataDir = dataDir + self.MapiTask = jpype.JClass("com.aspose.email.MapiTask") + self.MapiTaskHistory = jpype.JClass("com.aspose.email.MapiTaskHistory") + self.MapiTaskOwnership = jpype.JClass("com.aspose.email.MapiTaskOwnership") + self.PersonalStorage = jpype.JClass("com.aspose.email.PersonalStorage") + self.FileFormatVersion = jpype.JClass("com.aspose.email.FileFormatVersion") + self.StandardIpmFolder = jpype.JClass("com.aspose.email.StandardIpmFolder") + + self.Date = jpype.JClass("java.util.Date") + self.Calendar = jpype.JClass("java.util.Calendar") + + + def main(self): + + task = self.MapiTask("To Do", "Just click and type to add task", self.Date(), self.Date()) + task.setPercentComplete(20) + task.setEstimatedEffort(2000) + task.setActualEffort(20) + + mapiTaskHistory = self.MapiTaskHistory() + + task.setHistory(mapiTaskHistory.Assigned) + task.setLastUpdate(self.Date()) + task.getUsers().setOwner("Darius") + task.getUsers().setLastAssigner("Harkness") + task.getUsers().setLastDelegate("Harkness") + + mapiTaskOwnership = self.MapiTaskOwnership() + task.getUsers().setOwnership(mapiTaskOwnership.AssignersCopy) + + personalStorage = self.PersonalStorage + fileFormatVersion = self.FileFormatVersion + pst = personalStorage.create(self.dataDir + "TaskPST.pst", fileFormatVersion.Unicode) + standardIpmFolder = self.StandardIpmFolder + task_folder = pst.createPredefinedFolder("Tasks",standardIpmFolder.Tasks) + task_folder.addMapiMessageItem(task) + + print "Added MapiTask Successfully." + +class CreateOutlookContact: + + def __init__(self,dataDir): + + self.dataDir = dataDir + self.MapiContact = jpype.JClass("com.aspose.email.MapiContact") + self.MapiContactNamePropertySet = jpype.JClass("com.aspose.email.MapiContactNamePropertySet") + self.MapiContactProfessionalPropertySet = jpype.JClass("com.aspose.email.MapiContactProfessionalPropertySet") + self.MapiContactTelephonePropertySet = jpype.JClass("com.aspose.email.MapiContactTelephonePropertySet") + self.MapiContactPhysicalAddress = jpype.JClass("com.aspose.email.MapiContactPhysicalAddress") + self.MapiContactPhysicalAddressPropertySet = jpype.JClass("com.aspose.email.MapiContactPhysicalAddressPropertySet") + self.MapiContactElectronicAddress = jpype.JClass("com.aspose.email.MapiContactElectronicAddress") + self.MapiContactElectronicAddressPropertySet = jpype.JClass("com.aspose.email.MapiContactElectronicAddressPropertySet") + self.ContactSaveFormat = jpype.JClass("com.aspose.email.ContactSaveFormat") + + + def main(self): + + contact = self.MapiContact() + + # Set different properties of this Contact Item. + + # Set Name properties using MapiContactNamePropertySet + name_prop_set = self.MapiContactNamePropertySet() + name_prop_set.setSurname("Mellissa") + name_prop_set.setGivenName("MacBeth") + contact.setNameInfo(name_prop_set) + + # Set professional properties using MapiContactProfessionalPropertySet + prof_prop_set = self.MapiContactProfessionalPropertySet() + prof_prop_set.setTitle("Account Representative") + prof_prop_set.setCompanyName("Contoso Ltd.") + prof_prop_set.setOfficeLocation("36/2529") + contact.setProfessionalInfo(prof_prop_set) + + # Telephones + telephone = self.MapiContactTelephonePropertySet() + telephone.setAssistantTelephoneNumber("(831) 758-7214") + telephone.setBusiness2TelephoneNumber("(831) 759-2518") + telephone.setBusinessTelephoneNumber("(831) 758-7285") + telephone.setCallbackTelephoneNumber("(831) 758-7321 (After hours") + telephone.setCarTelephoneNumber("(831) 758-7201") + telephone.setCompanyMainTelephoneNumber("(831) 758-7368") + telephone.setHome2TelephoneNumber("(831) 758-7256") + telephone.setHomeTelephoneNumber("(831) 758-7257") + telephone.setIsdnNumber("(831) 758-7381") + telephone.setMobileTelephoneNumber("(831) 758-7368") + telephone.setOtherTelephoneNumber("(831) 758-7201") + telephone.setPagerTelephoneNumber("(831) 758-7368") + telephone.setPrimaryTelephoneNumber("(831) 758-7334") + telephone.setRadioTelephoneNumber("(831) 758-7234") + telephone.setTelexNumber("(831) 758-7408") + telephone.setTtyTddPhoneNumber("(800) 806-4474") + contact.setTelephones(telephone) + + # Set Physical Address using MapiContactPhysicalAddress and MapiContactPhysicalAddressPropertySet + phys_addrss = self.MapiContactPhysicalAddress() + phys_addrss.setPostOfficeBox("144 Hitchcock Rd, Salinas, CA 93908") + + phys_addr_prop_set = self.MapiContactPhysicalAddressPropertySet() + phys_addr_prop_set.setWorkAddress(phys_addrss) + contact.setPhysicalAddresses(phys_addr_prop_set) + + # Set email information using MapiContactElectronicAddress and MapiContactElectronicAddressPropertySet + email = self.MapiContactElectronicAddress() + email.setAddressType("SMTP") + email.setDisplayName("Melissa MacBeth (mellissa@contoso.com)") + email.setEmailAddress("melissa@contoso.com") + + elec_addr_prop_set = self.MapiContactElectronicAddressPropertySet() + elec_addr_prop_set.setEmail1(email) + contact.setElectronicAddresses(elec_addr_prop_set) + + contactSaveFormat = self.ContactSaveFormat + contact.save(self.dataDir + "OutlookContact.vcf", contactSaveFormat.VCard) + + print "Created outlook contact successfully." + + +class CreateOutlookNote: + + def __init__(self,dataDir): + + self.dataDir = dataDir + self.MapiNote = jpype.JClass("com.aspose.email.MapiNote") + self.NoteColor = jpype.JClass("com.aspose.email.NoteColor") + self.NoteSaveFormat = jpype.JClass("com.aspose.email.NoteSaveFormat") + + def main(self): + + note = self.MapiNote() + note.setSubject("Blue color note") + note.setBody("This is a blue color note") + noteColor = self.NoteColor + note.setColor(noteColor.Blue) + note.setHeight(500) + note.setWidth(500) + + noteSaveFormat = self.NoteSaveFormat + + note.save(self.dataDir + "MapiNote.msg", noteSaveFormat.Msg) + + print "Created outlook note successfully." + +class CreateOutlookTask: + + def __init__(self,dataDir): + + self.dataDir = dataDir + self.MapiNote = jpype.JClass("com.aspose.email.MapiNote") + self.MapiContact = jpype.JClass("com.aspose.email.MapiContact") + self.MapiTask = jpype.JClass("com.aspose.email.MapiTask") + self.MapiTaskHistory = jpype.JClass("com.aspose.email.MapiTaskHistory") + self.MapiTaskOwnership = jpype.JClass("com.aspose.email.MapiTaskOwnership") + self.MapiSensitivity = jpype.JClass("com.aspose.email.MapiSensitivity") + self.MapiTaskStatus = jpype.JClass("com.aspose.email.MapiTaskStatus") + self.TaskSaveFormat = jpype.JClass("com.aspose.email.TaskSaveFormat") + + self.Calendar = jpype.JClass("java.util.Calendar") + self.TimeZone = jpype.JClass("java.util.TimeZone") + + + def main(self): + contact = self.MapiContact() + + calendar = self.Calendar + timeZone = self.TimeZone + calendar = calendar.getInstance(timeZone.getTimeZone("GMT")) + calendar.set(2012, calendar.NOVEMBER, 1, 0, 0, 0) + startDate = calendar.getTime() + calendar.set(2012, calendar.DECEMBER, 1) + endDate = calendar.getTime() + + task = self.MapiTask("To Do", "Just click and type to add task", startDate, endDate) + task.setPercentComplete(20) + task.setEstimatedEffort(2000) + task.setActualEffort(20) + + mapiTaskHistory = self.MapiTaskHistory() + task.setHistory(mapiTaskHistory.Assigned) + task.getUsers().setOwner("Darius") + task.getUsers().setLastAssigner("Harkness") + task.getUsers().setLastDelegate("Harkness") + + mapiTaskOwnership = self.MapiTaskOwnership() + + task.getUsers().setOwnership(mapiTaskOwnership.AssignersCopy) + companies = ["company1", "company2", "company3"] + task.setCompanies(companies) + categories = ["category1", "category2", "category3"] + task.setCategories(categories) + task.setMileage("Some test mileage") + task.setBilling("Test billing information") + task.getUsers().setDelegator("Test Delegator") + + mapiSensitivity = self.MapiSensitivity + task.setSensitivity(mapiSensitivity.Personal) + mapiTaskStatus = self.MapiTaskStatus() + task.setStatus(mapiTaskStatus.Complete) + + taskSaveFormat = self.TaskSaveFormat + + task.save(self.dataDir + "MapiTask.msg", taskSaveFormat.Msg) + + print "Created outlook task successfully." + +class CreatePST: + + def __init__(self,dataDir): + + self.dataDir = dataDir + self.MapiMessage = jpype.JClass("com.aspose.email.MapiMessage") + self.NoteColor = jpype.JClass("com.aspose.email.NoteColor") + self.PersonalStorage = jpype.JClass("com.aspose.email.PersonalStorage") + self.FileFormatVersion = jpype.JClass("com.aspose.email.FileFormatVersion") + self.StandardIpmFolder = jpype.JClass("com.aspose.email.StandardIpmFolder") + + def main(self): + + # 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." + + +class DistributionList: + + def __init__(self,dataDir): + + self.dataDir = dataDir + self.MapiDistributionListMemberCollection = jpype.JClass("com.aspose.email.MapiDistributionListMemberCollection") + + def main(self): + oneOffmembers = self.MapiDistributionListMemberCollection() + oneOffmembers.addItem(self.MapiDistributionListMemberCollection("John R. Patrick", "JohnRPatrick@armyspy.com")) + oneOffmembers.addItem(self.MapiDistributionListMemberCollection("Tilly Bates", "TillyBates@armyspy.com")) + + dlist = self.MapiDistributionListMemberCollection("Simple list", oneOffmembers) + dlist.setBody("Test body") + dlist.setSubject("Test subject") + dlist.setMileage("Test mileage") + dlist.setBilling("Test billing") + + dlist.save(self.dataDir + "distlist.msg") + + print "Saved distribution list successfully." + +class ParseOutlookMessageFile: + + def __init__(self,dataDir): + + self.dataDir = dataDir + self.MapiMessage = jpype.JClass("com.aspose.email.MapiMessage") + self.MapiDistributionListMemberCollection = jpype.JClass("com.aspose.email.MapiDistributionListMemberCollection") + + def main(self): + + mapiMessage = self.MapiMessage + outlook_message_file = mapiMessage.fromFile(self.dataDir + "Message.msg") + + # Display sender's name + print "Sender Name : " + print outlook_message_file.getSenderName() + + #Display Subject + print "Subject : " + print outlook_message_file.getSubject() + + # Display Body + print "Body : " + print outlook_message_file.getBody() + + +class SearchMessagesAndFoldersInPST: + + def __init__(self,dataDir): + + self.dataDir = dataDir + self.PersonalStorage = jpype.JClass("com.aspose.email.PersonalStorage") + self.PersonalStorageQueryBuilder = jpype.JClass("com.aspose.email.PersonalStorageQueryBuilder") + self.MapiImportance = jpype.JClass("com.aspose.email.MapiImportance") + self.MapiMessageFlags = jpype.JClass("com.aspose.email.MapiMessageFlags") + + + def main(self): + # Load the Outlook PST file + personalStorage = self.PersonalStorage + pst = personalStorage.fromFile(self.dataDir + "sample1.pst") + + folder = pst.getRootFolder().getSubFolder("myInbox") + builder = self.PersonalStorageQueryBuilder() + + # High importance messages + mapiImportance = self.MapiImportance + builder.getImportance().equals(mapiImportance.High) + messages = folder.getContents(builder.getQuery()) + print "Messages with High Imp:" + print messages.size() + + #builder = PersonalStorageQueryBuilder() + builder.getMessageClass().equals("IPM.Note") + messages = folder.getContents(builder.getQuery()) + print "Messages with IPM.Note:" + print messages.size() + + # Messages with attachments AND high importance + builder.getImportance().equals(mapiImportance.High) + + mapiMessageFlags = self.MapiMessageFlags + + builder.hasFlags(mapiMessageFlags.MSGFLAG_HASATTACH) + messages = folder.getContents(builder.getQuery()) + print "Messages with atts: " + print messages.size() + + # Messages with size > 15 KB + builder.getMessageSize().greater(15000) + messages = folder.getContents(builder.getQuery()) + print "messags size > 15Kb:" + print messages.size() + + # Unread messages + builder.hasNoFlags(mapiMessageFlags.MSGFLAG_READ) + messages = folder.getContents(builder.getQuery()) + print "Unread:" + print messages.size() + + # Unread messages with attachments + builder.hasNoFlags(mapiMessageFlags.MSGFLAG_READ) + builder.hasFlags(mapiMessageFlags.MSGFLAG_HASATTACH) + messages = folder.getContents(builder.getQuery()) + print "Unread msgs with atts: " + print messages.size() + +class StringSearchInPST: + + def __init__(self,dataDir): + + self.dataDir = dataDir + self.MapiMessage = jpype.JClass("com.aspose.email.MapiMessage") + self.MailMessage = jpype.JClass("com.aspose.email.MailMessage") + self.NoteColor = jpype.JClass("com.aspose.email.NoteColor") + self.PersonalStorage = jpype.JClass("com.aspose.email.PersonalStorage") + self.FileFormatVersion = jpype.JClass("com.aspose.email.FileFormatVersion") + self.StandardIpmFolder = jpype.JClass("com.aspose.email.StandardIpmFolder") + self.MailQueryBuilder = jpype.JClass("com.aspose.email.MailQueryBuilder") + + def main(self): + personalStorage = self.PersonalStorage + fileFormatVersion = self.FileFormatVersion + pst = personalStorage.create(self.dataDir + "search.pst", fileFormatVersion.Unicode) + + standardIpmFolder = self.StandardIpmFolder + fi = pst.createPredefinedFolder("Inbox", standardIpmFolder.Inbox) + + mapiMessage = self.MapiMessage + mailMessage = self.MailMessage + fi.addMessage(mapiMessage.fromMailMessage(mailMessage.load(self.dataDir + "search.pst"))) + + builder = self.MailQueryBuilder() + builder.getFrom().contains("automated", True) + + query = builder.getQuery() + coll = fi.getContents(query) + + print "Total Results:" + print coll.size() + +class AddMapiCalendarToPST: + + def _init_(self,dataDir): + + self.dataDir = dataDir + self.MapiCalendar = jpype.JClass("com.aspose.email.MapiCalendar") + self.MapiRecipientCollection = jpype.JClass("com.aspose.email.MapiRecipientCollection") + self.MapiRecipientType = jpype.JClass("com.aspose.email.MapiRecipientType") + self.PersonalStorage = jpype.JClass("com.aspose.email.PersonalStorage") + self.FileFormatVersion = jpype.JClass("com.aspose.email.FileFormatVersion") + self.FileFormatVersion = jpype.JClass("com.aspose.email.StandardIpmFolder") + self.Date = jpype.JClass("java.util.Date") + def main(self): + + # Create the appointment + mapiCalendar = self.MapiCalendar + appointment = mapiCalendar("LAKE ARGYLE WA 6743","Appointment","This is a very important meeting :)",Date(2012, 10, 2),Date(2012, 10, 2, 14, 0, 0)) + + # Create the meeting + attendees = self.MapiRecipientCollection() + + mapiRecipientType = self.MapiRecipientType() + + attendees.add("ReneeAJones@armyspy.com", "Renee A. Jones", mapiRecipientType.MAPI_TO) + attendees.add("SzllsyLiza@dayrep.com", "Szollosy Liza", mapiRecipientType.MAPI_TO) + + meeting = self.MapiCalendar( + "Meeting Room 3 at Office Headquarters", + "Meeting", + "Please confirm your availability.", + Date(2012, 10, 2, 13, 0, 0), + Date(2012, 10, 2, 14, 0, 0), + "CharlieKhan@dayrep.com", + attendees + ) + personalStorage = self.PersonalStorage() + + fileFormatVersion = self.FileFormatVersion() + standardIpmFolder = self.StandardIpmFolder() + + pst = personalStorage.create(self.dataDir + "MapiCalendarToPST1.pst", fileFormatVersion.Unicode) + calendar_folder = pst.createPredefinedFolder("Calendar", standardIpmFolder.Appointments) + calendar_folder.addMapiMessageItem(appointment) + calendar_folder.addMapiMessageItem(meeting) + + print "Added MapiCalendar Successfully." \ No newline at end of file diff --git a/Plugins/Aspose.Email Java for Python/ProgrammingOutlook/__init__.pyc b/Plugins/Aspose.Email Java for Python/ProgrammingOutlook/__init__.pyc new file mode 100644 index 0000000..02fc600 Binary files /dev/null and b/Plugins/Aspose.Email Java for Python/ProgrammingOutlook/__init__.pyc differ diff --git a/Plugins/Aspose.Email Java for Python/README.md b/Plugins/Aspose.Email Java for Python/README.md new file mode 100644 index 0000000..e16dcad --- /dev/null +++ b/Plugins/Aspose.Email Java for Python/README.md @@ -0,0 +1,22 @@ +## Aspose.Email Java for Python + +Aspose.Email Java for Python is a project that demonstrates / provides the Aspose.Email for Java API usage examples in Python. + +## Download + +* To download Aspose.Email for Java API to be used with these examples, Please navigate to [Aspose.Email for Java](http://www.aspose.com/downloads/email-family/java) +* Place downloaded jar file into "lib" directory. + +## Documentation + +For most complete documentation of the project, check [Aspose.Email Java For Python confluence wiki](http://www.aspose.com/docs/display/emailjava/Aspose.Email+Java+For+Python). + +## Download Latest Versions? + +* [Latest Releases on Codeplex](http://asposeemailjavapython.codeplex.com/releasesce) + +## Clone Plugin SourceCodes? + +This project is also hosted and maintained at CodePlex. To clone navigate to: + +* [Aspose.Email Java for Python on CodePlex - click here](https://asposeemailjavapython.codeplex.com/SourceControl/latest) \ No newline at end of file diff --git a/Plugins/Aspose.Email Java for Python/aspose-email-java-for-python.egg-info/PKG-INFO b/Plugins/Aspose.Email Java for Python/aspose-email-java-for-python.egg-info/PKG-INFO new file mode 100644 index 0000000..01bb621 --- /dev/null +++ b/Plugins/Aspose.Email Java for Python/aspose-email-java-for-python.egg-info/PKG-INFO @@ -0,0 +1,14 @@ +Metadata-Version: 1.1 +Name: aspose-email-java-for-python +Version: 1.0 +Summary: Aspose.Email Java for Python is a project that demonstrates / provides the Aspose.Email for Java API usage examples in Python. +Home-page: http://www.aspose.com/docs/display/emailjava/Aspose.Email+Java+for+Python +Author: Fahad Adeel +Author-email: email@aspose.com +License: UNKNOWN +Description: UNKNOWN +Platform: UNKNOWN +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 2 +Classifier: License :: OSI Approved :: MIT License +Classifier: Operating System :: OS Independent diff --git a/Plugins/Aspose.Email Java for Python/aspose-email-java-for-python.egg-info/SOURCES.txt b/Plugins/Aspose.Email Java for Python/aspose-email-java-for-python.egg-info/SOURCES.txt new file mode 100644 index 0000000..5d4f878 --- /dev/null +++ b/Plugins/Aspose.Email Java for Python/aspose-email-java-for-python.egg-info/SOURCES.txt @@ -0,0 +1,7 @@ +setup.py +ProgrammingEmail/__init__.py +ProgrammingOutlook/__init__.py +aspose_email_java_for_python.egg-info/PKG-INFO +aspose_email_java_for_python.egg-info/SOURCES.txt +aspose_email_java_for_python.egg-info/dependency_links.txt +aspose_email_java_for_python.egg-info/top_level.txt \ No newline at end of file diff --git a/Plugins/Aspose.Email Java for Python/aspose-email-java-for-python.egg-info/dependency_links.txt b/Plugins/Aspose.Email Java for Python/aspose-email-java-for-python.egg-info/dependency_links.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Plugins/Aspose.Email Java for Python/aspose-email-java-for-python.egg-info/dependency_links.txt @@ -0,0 +1 @@ + diff --git a/Plugins/Aspose.Email Java for Python/aspose-email-java-for-python.egg-info/top_level.txt b/Plugins/Aspose.Email Java for Python/aspose-email-java-for-python.egg-info/top_level.txt new file mode 100644 index 0000000..0618953 --- /dev/null +++ b/Plugins/Aspose.Email Java for Python/aspose-email-java-for-python.egg-info/top_level.txt @@ -0,0 +1,2 @@ +ProgrammingEmail +ProgrammingOutlook diff --git a/Plugins/Aspose.Email Java for Python/aspose-email-java-for-python.py b/Plugins/Aspose.Email Java for Python/aspose-email-java-for-python.py new file mode 100644 index 0000000..6aad176 --- /dev/null +++ b/Plugins/Aspose.Email Java for Python/aspose-email-java-for-python.py @@ -0,0 +1,9 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +__author__ = "nhp09" +__date__ = "$Feb 22, 2016 12:07:10 PM$" + +if __name__ == "__main__": + print "Hello World" diff --git a/Plugins/Aspose.Email Java for Python/dist/aspose-email-java-for-python-1.0.tar.gz b/Plugins/Aspose.Email Java for Python/dist/aspose-email-java-for-python-1.0.tar.gz new file mode 100644 index 0000000..4a68505 Binary files /dev/null and b/Plugins/Aspose.Email Java for Python/dist/aspose-email-java-for-python-1.0.tar.gz differ diff --git a/Plugins/Aspose.Email Java for Python/setup.py b/Plugins/Aspose.Email Java for Python/setup.py new file mode 100644 index 0000000..a748cc7 --- /dev/null +++ b/Plugins/Aspose.Email Java for Python/setup.py @@ -0,0 +1,19 @@ +__author__ = 'fahadadeel' + +from setuptools import setup, find_packages + +setup( + name = 'aspose-email-java-for-python', + packages = find_packages(), + version = '1.0', + description = 'Aspose.Email Java for Python is a project that demonstrates / provides the Aspose.Email for Java API usage examples in Python.', + author='Fahad Adeel', + author_email='email@aspose.com', + url='http://www.aspose.com/docs/display/emailjava/Aspose.Email+Java+for+Python', + classifiers=[ + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'License :: OSI Approved :: MIT License', + 'Operating System :: OS Independent' + ] +) \ No newline at end of file diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/Converter/Converter.py b/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/Converter/Converter.py new file mode 100644 index 0000000..eb4e66a --- /dev/null +++ b/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/Converter/Converter.py @@ -0,0 +1,21 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +#if __name__ == "__main__": +# print "Hello World" + +from ProgrammingEmail import Converter +import jpype +import os.path + +asposeapispath = os.path.join(os.path.abspath("./../../../"), "lib/") +dataDir = os.path.join(os.path.abspath("./"), "data/") + +print "You need to put your Aspose.Email for Java APIs .jars in this folder:\n"+asposeapispath + +#print dataDir +jpype.startJVM(jpype.getDefaultJVMPath(), "-Djava.ext.dirs=%s" % asposeapispath) + +hw = Converter(dataDir) +hw.main() \ No newline at end of file diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/Converter/data/AnEmail.msg b/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/Converter/data/AnEmail.msg new file mode 100644 index 0000000..a024282 Binary files /dev/null and b/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/Converter/data/AnEmail.msg differ diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/CreateNewEmail/CreateNewEmail.py b/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/CreateNewEmail/CreateNewEmail.py new file mode 100644 index 0000000..462e8c0 --- /dev/null +++ b/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/CreateNewEmail/CreateNewEmail.py @@ -0,0 +1,21 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +#if __name__ == "__main__": +# print "Hello World" + +from ProgrammingEmail import CreateNewEmail +import jpype +import os.path + +asposeapispath = os.path.join(os.path.abspath("./../../../"), "lib/") +dataDir = os.path.join(os.path.abspath("./"), "data/") + +print "You need to put your Aspose.Email for Java APIs .jars in this folder:\n"+asposeapispath + +#print dataDir +jpype.startJVM(jpype.getDefaultJVMPath(), "-Djava.ext.dirs=%s" % asposeapispath) + +hw = CreateNewEmail(dataDir) +hw.main() \ No newline at end of file diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/CreateNewEmail/data/Message.msg b/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/CreateNewEmail/data/Message.msg new file mode 100644 index 0000000..0cd617b Binary files /dev/null and b/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/CreateNewEmail/data/Message.msg differ diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/CustomizeEmailHeaders/CustomizeEmailHeaders.py b/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/CustomizeEmailHeaders/CustomizeEmailHeaders.py new file mode 100644 index 0000000..c85fb78 --- /dev/null +++ b/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/CustomizeEmailHeaders/CustomizeEmailHeaders.py @@ -0,0 +1,21 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +#if __name__ == "__main__": +# print "Hello World" + +from ProgrammingEmail import CustomizeEmailHeaders +import jpype +import os.path + +asposeapispath = os.path.join(os.path.abspath("./../../../"), "lib/") +dataDir = os.path.join(os.path.abspath("./"), "data/") + +print "You need to put your Aspose.Email for Java APIs .jars in this folder:\n"+asposeapispath + +#print dataDir +jpype.startJVM(jpype.getDefaultJVMPath(), "-Djava.ext.dirs=%s" % asposeapispath) + +hw = CustomizeEmailHeaders(dataDir) +hw.main() \ No newline at end of file diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/CustomizeEmailHeaders/data/MsgHeaders.msg b/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/CustomizeEmailHeaders/data/MsgHeaders.msg new file mode 100644 index 0000000..c03c869 Binary files /dev/null and b/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/CustomizeEmailHeaders/data/MsgHeaders.msg differ diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/GetEmailInfo/GetEmailInfo.py b/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/GetEmailInfo/GetEmailInfo.py new file mode 100644 index 0000000..e279b87 --- /dev/null +++ b/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/GetEmailInfo/GetEmailInfo.py @@ -0,0 +1,21 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +#if __name__ == "__main__": +# print "Hello World" + +from ProgrammingEmail import GetEmailInfo +import jpype +import os.path + +asposeapispath = os.path.join(os.path.abspath("./../../../"), "lib/") +dataDir = os.path.join(os.path.abspath("./"), "data/") + +print "You need to put your Aspose.Email for Java APIs .jars in this folder:\n"+asposeapispath + +#print dataDir +jpype.startJVM(jpype.getDefaultJVMPath(), "-Djava.ext.dirs=%s" % asposeapispath) + +hw = GetEmailInfo(dataDir) +hw.main() \ No newline at end of file diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/ManageAttachments/ManageAttachments.py b/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/ManageAttachments/ManageAttachments.py new file mode 100644 index 0000000..13a51bb --- /dev/null +++ b/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/ManageAttachments/ManageAttachments.py @@ -0,0 +1,21 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +#if __name__ == "__main__": +# print "Hello World" + +from ProgrammingEmail import ManageAttachments +import jpype +import os.path + +asposeapispath = os.path.join(os.path.abspath("./../../../"), "lib/") +dataDir = os.path.join(os.path.abspath("./"), "data/") + +print "You need to put your Aspose.Email for Java APIs .jars in this folder:\n"+asposeapispath + +#print dataDir +jpype.startJVM(jpype.getDefaultJVMPath(), "-Djava.ext.dirs=%s" % asposeapispath) + +hw = ManageAttachments(dataDir) +hw.main() \ No newline at end of file diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/ManageAttachments/data/1.txt b/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/ManageAttachments/data/1.txt new file mode 100644 index 0000000..db63818 --- /dev/null +++ b/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/ManageAttachments/data/1.txt @@ -0,0 +1 @@ +This is text attachment file used for Aspose.Email examples. \ No newline at end of file diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/ManageAttachments/data/Add-Attachment.msg b/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/ManageAttachments/data/Add-Attachment.msg new file mode 100644 index 0000000..bd968c9 Binary files /dev/null and b/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/ManageAttachments/data/Add-Attachment.msg differ diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/SaveMessageAsDraft/SaveMessageAsDraft.py b/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/SaveMessageAsDraft/SaveMessageAsDraft.py new file mode 100644 index 0000000..9945afc --- /dev/null +++ b/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/SaveMessageAsDraft/SaveMessageAsDraft.py @@ -0,0 +1,21 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +#if __name__ == "__main__": +# print "Hello World" + +from ProgrammingEmail import SaveMessageAsDraft +import jpype +import os.path + +asposeapispath = os.path.join(os.path.abspath("./../../../"), "lib/") +dataDir = os.path.join(os.path.abspath("./"), "data/") + +print "You need to put your Aspose.Email for Java APIs .jars in this folder:\n"+asposeapispath + +#print dataDir +jpype.startJVM(jpype.getDefaultJVMPath(), "-Djava.ext.dirs=%s" % asposeapispath) + +hw = SaveMessageAsDraft(dataDir) +hw.main() \ No newline at end of file diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/SaveMessageAsDraft/data/New-Draft.msg b/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/SaveMessageAsDraft/data/New-Draft.msg new file mode 100644 index 0000000..3fb6dd6 Binary files /dev/null and b/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/SaveMessageAsDraft/data/New-Draft.msg differ diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/UpdateEmail/UpdateEmail.py b/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/UpdateEmail/UpdateEmail.py new file mode 100644 index 0000000..a4a15b1 --- /dev/null +++ b/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/UpdateEmail/UpdateEmail.py @@ -0,0 +1,21 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +#if __name__ == "__main__": +# print "Hello World" + +from ProgrammingEmail import UpdateEmail +import jpype +import os.path + +asposeapispath = os.path.join(os.path.abspath("./../../../"), "lib/") +dataDir = os.path.join(os.path.abspath("./"), "data/") + +print "You need to put your Aspose.Email for Java APIs .jars in this folder:\n"+asposeapispath + +#print dataDir +jpype.startJVM(jpype.getDefaultJVMPath(), "-Djava.ext.dirs=%s" % asposeapispath) + +hw = UpdateEmail(dataDir) +hw.main() \ No newline at end of file diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/UpdateEmail/data/Message.msg b/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/UpdateEmail/data/Message.msg new file mode 100644 index 0000000..9d39c17 Binary files /dev/null and b/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/UpdateEmail/data/Message.msg differ diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/UpdateEmail/data/UpdateMessage.msg b/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/UpdateEmail/data/UpdateMessage.msg new file mode 100644 index 0000000..986e41c Binary files /dev/null and b/Plugins/Aspose.Email Java for Python/tests/ProgrammingEmail/UpdateEmail/data/UpdateMessage.msg differ diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/AddFileToPST/AddFileToPST.py b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/AddFileToPST/AddFileToPST.py new file mode 100644 index 0000000..6d3797e --- /dev/null +++ b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/AddFileToPST/AddFileToPST.py @@ -0,0 +1,21 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +#if __name__ == "__main__": +# print "Hello World" + +from ProgrammingOutlook import AddFileToPST +import jpype +import os.path + +asposeapispath = os.path.join(os.path.abspath("./../../../"), "lib/") +dataDir = os.path.join(os.path.abspath("./"), "data/") + +print "You need to put your Aspose.Email for Java APIs .jars in this folder:\n"+asposeapispath + +#print dataDir +jpype.startJVM(jpype.getDefaultJVMPath(), "-Djava.ext.dirs=%s" % asposeapispath) + +hw = AddFileToPST(dataDir) +hw.main() \ No newline at end of file diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/AddFileToPST/data/Report.xlsx b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/AddFileToPST/data/Report.xlsx new file mode 100644 index 0000000..271cef7 Binary files /dev/null and b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/AddFileToPST/data/Report.xlsx differ diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/AddMapiCalendarToPST/AddMapiCalendarToPST.py b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/AddMapiCalendarToPST/AddMapiCalendarToPST.py new file mode 100644 index 0000000..0038c21 --- /dev/null +++ b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/AddMapiCalendarToPST/AddMapiCalendarToPST.py @@ -0,0 +1,21 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +#if __name__ == "__main__": +# print "Hello World" + +from ProgrammingOutlook import AddMapiCalendarToPST +import jpype +import os.path + +asposeapispath = os.path.join(os.path.abspath("./../../../"), "lib/") +dataDir = os.path.join(os.path.abspath("./"), "data/") + +print "You need to put your Aspose.Email for Java APIs .jars in this folder:\n"+asposeapispath + +#print dataDir +jpype.startJVM(jpype.getDefaultJVMPath(), "-Djava.ext.dirs=%s" % asposeapispath) + +hw = AddMapiCalendarToPST() +hw.main() \ No newline at end of file diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/AddMapiContactToPST/AddMapiContactToPST.py b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/AddMapiContactToPST/AddMapiContactToPST.py new file mode 100644 index 0000000..28e9e61 --- /dev/null +++ b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/AddMapiContactToPST/AddMapiContactToPST.py @@ -0,0 +1,21 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +#if __name__ == "__main__": +# print "Hello World" + +from ProgrammingOutlook import AddMapiContactToPST +import jpype +import os.path + +asposeapispath = os.path.join(os.path.abspath("./../../../"), "lib/") +dataDir = os.path.join(os.path.abspath("./"), "data/") + +print "You need to put your Aspose.Email for Java APIs .jars in this folder:\n"+asposeapispath + +#print dataDir +jpype.startJVM(jpype.getDefaultJVMPath(), "-Djava.ext.dirs=%s" % asposeapispath) + +hw = AddMapiContactToPST(dataDir) +hw.main() \ No newline at end of file diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/AddMapiJournalToPST/AddMapiJournalToPST.py b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/AddMapiJournalToPST/AddMapiJournalToPST.py new file mode 100644 index 0000000..459fd23 --- /dev/null +++ b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/AddMapiJournalToPST/AddMapiJournalToPST.py @@ -0,0 +1,21 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +#if __name__ == "__main__": +# print "Hello World" + +from ProgrammingOutlook import AddMapiJournalToPST +import jpype +import os.path + +asposeapispath = os.path.join(os.path.abspath("./../../../"), "lib/") +dataDir = os.path.join(os.path.abspath("./"), "data/") + +print "You need to put your Aspose.Email for Java APIs .jars in this folder:\n"+asposeapispath + +#print dataDir +jpype.startJVM(jpype.getDefaultJVMPath(), "-Djava.ext.dirs=%s" % asposeapispath) + +hw = AddMapiJournalToPST(dataDir) +hw.main() \ No newline at end of file diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/AddMapiNoteToPST/AddMapiNoteToPST.py b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/AddMapiNoteToPST/AddMapiNoteToPST.py new file mode 100644 index 0000000..17a2616 --- /dev/null +++ b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/AddMapiNoteToPST/AddMapiNoteToPST.py @@ -0,0 +1,21 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +#if __name__ == "__main__": +# print "Hello World" + +from ProgrammingOutlook import AddMapiNoteToPST +import jpype +import os.path + +asposeapispath = os.path.join(os.path.abspath("./../../../"), "lib/") +dataDir = os.path.join(os.path.abspath("./"), "data/") + +print "You need to put your Aspose.Email for Java APIs .jars in this folder:\n"+asposeapispath + +#print dataDir +jpype.startJVM(jpype.getDefaultJVMPath(), "-Djava.ext.dirs=%s" % asposeapispath) + +hw = AddMapiNoteToPST(dataDir) +hw.main() \ No newline at end of file diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/AddMapiNoteToPST/data/MapiNote.msg b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/AddMapiNoteToPST/data/MapiNote.msg new file mode 100644 index 0000000..9d39c17 Binary files /dev/null and b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/AddMapiNoteToPST/data/MapiNote.msg differ diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/AddMapiNoteToPST/data/MapiNoteToPST.pst b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/AddMapiNoteToPST/data/MapiNoteToPST.pst new file mode 100644 index 0000000..ddae385 Binary files /dev/null and b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/AddMapiNoteToPST/data/MapiNoteToPST.pst differ diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/AddMapiTaskToPST/AddMapiTaskToPST.py b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/AddMapiTaskToPST/AddMapiTaskToPST.py new file mode 100644 index 0000000..4147444 --- /dev/null +++ b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/AddMapiTaskToPST/AddMapiTaskToPST.py @@ -0,0 +1,21 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +#if __name__ == "__main__": +# print "Hello World" + +from ProgrammingOutlook import AddMapiTaskToPST +import jpype +import os.path + +asposeapispath = os.path.join(os.path.abspath("./../../../"), "lib/") +dataDir = os.path.join(os.path.abspath("./"), "data/") + +print "You need to put your Aspose.Email for Java APIs .jars in this folder:\n"+asposeapispath + +#print dataDir +jpype.startJVM(jpype.getDefaultJVMPath(), "-Djava.ext.dirs=%s" % asposeapispath) + +hw = AddMapiTaskToPST(dataDir) +hw.main() \ No newline at end of file diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/CreateOutlookContact/CreateOutlookContact.py b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/CreateOutlookContact/CreateOutlookContact.py new file mode 100644 index 0000000..89036c0 --- /dev/null +++ b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/CreateOutlookContact/CreateOutlookContact.py @@ -0,0 +1,21 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +#if __name__ == "__main__": +# print "Hello World" + +from ProgrammingOutlook import CreateOutlookContact +import jpype +import os.path + +asposeapispath = os.path.join(os.path.abspath("./../../../"), "lib/") +dataDir = os.path.join(os.path.abspath("./"), "data/") + +print "You need to put your Aspose.Email for Java APIs .jars in this folder:\n"+asposeapispath + +#print dataDir +jpype.startJVM(jpype.getDefaultJVMPath(), "-Djava.ext.dirs=%s" % asposeapispath) + +hw = CreateOutlookContact(dataDir) +hw.main() \ No newline at end of file diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/CreateOutlookContact/data/OutlookContact.vcf b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/CreateOutlookContact/data/OutlookContact.vcf new file mode 100644 index 0000000..90dab0f --- /dev/null +++ b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/CreateOutlookContact/data/OutlookContact.vcf @@ -0,0 +1,25 @@ +BEGIN:VCARD +VERSION:2.1 +N:Mellissa;MacBeth +TITLE:Account Representative +ORG:Contoso Ltd. +TEL;TYPE=HOME:(831) 758-7257 +TEL;TYPE=WORK:(831) 758-7285 +TEL;TYPE=CELL:(831) 758-7368 +TEL;TYPE=PAGER:(831) 758-7368 +TEL;TYPE=CAR:(831) 758-7201 +TEL;TYPE=ISDN:(831) 758-7381 +TEL;TYPE=PREF:(831) 758-7334 +TEL;TYPE=VOICE:(831) 758-7201 +X-MS-TEL;TYPE=TELEX:(831) 758-7408 +X-MS-TEL;TYPE=CALLBACK:(831) 758-7321 (After hours +X-MS-TEL;TYPE=RADIO:(831) 758-7234 +X-MS-TEL;TYPE=COMPANY:(831) 758-7368 +X-MS-TEL;TYPE=TTY/TDD:(800) 806-4474 +X-MS-TEL;TYPE=ASSISTANT:(831) 758-7214 +EMAIL;TYPE=INTERNET:melissa@contoso.com +ADR;TYPE=WORK;ENCODING=QUOTED-PRINTABLE:144 Hitchcock Rd, Salinas, CA 93908= + +LABEL;TYPE=WORK;ENCODING=QUOTED-PRINTABLE:144 Hitchcock Rd, Salinas, CA 93908= + +END:VCARD \ No newline at end of file diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/CreateOutlookNote/CreateOutlookNote.py b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/CreateOutlookNote/CreateOutlookNote.py new file mode 100644 index 0000000..2be227a --- /dev/null +++ b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/CreateOutlookNote/CreateOutlookNote.py @@ -0,0 +1,21 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +#if __name__ == "__main__": +# print "Hello World" + +from ProgrammingOutlook import CreateOutlookNote +import jpype +import os.path + +asposeapispath = os.path.join(os.path.abspath("./../../../"), "lib/") +dataDir = os.path.join(os.path.abspath("./"), "data/") + +print "You need to put your Aspose.Email for Java APIs .jars in this folder:\n"+asposeapispath + +#print dataDir +jpype.startJVM(jpype.getDefaultJVMPath(), "-Djava.ext.dirs=%s" % asposeapispath) + +hw = CreateOutlookNote(dataDir) +hw.main() \ No newline at end of file diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/CreateOutlookNote/data/MapiNote.msg b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/CreateOutlookNote/data/MapiNote.msg new file mode 100644 index 0000000..a9e7266 Binary files /dev/null and b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/CreateOutlookNote/data/MapiNote.msg differ diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/CreateOutlookTask/CreateOutlookTask.py b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/CreateOutlookTask/CreateOutlookTask.py new file mode 100644 index 0000000..69b5813 --- /dev/null +++ b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/CreateOutlookTask/CreateOutlookTask.py @@ -0,0 +1,21 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +#if __name__ == "__main__": +# print "Hello World" + +from ProgrammingOutlook import CreateOutlookTask +import jpype +import os.path + +asposeapispath = os.path.join(os.path.abspath("./../../../"), "lib/") +dataDir = os.path.join(os.path.abspath("./"), "data/") + +print "You need to put your Aspose.Email for Java APIs .jars in this folder:\n"+asposeapispath + +#print dataDir +jpype.startJVM(jpype.getDefaultJVMPath(), "-Djava.ext.dirs=%s" % asposeapispath) + +hw = CreateOutlookTask(dataDir) +hw.main() \ No newline at end of file diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/CreateOutlookTask/data/MapiNote.msg b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/CreateOutlookTask/data/MapiNote.msg new file mode 100644 index 0000000..b194482 Binary files /dev/null and b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/CreateOutlookTask/data/MapiNote.msg differ diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/CreateOutlookTask/data/MapiTask.msg b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/CreateOutlookTask/data/MapiTask.msg new file mode 100644 index 0000000..3928727 Binary files /dev/null and b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/CreateOutlookTask/data/MapiTask.msg differ diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/CreatePST/CreatePST.py b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/CreatePST/CreatePST.py new file mode 100644 index 0000000..87b2a25 --- /dev/null +++ b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/CreatePST/CreatePST.py @@ -0,0 +1,21 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +#if __name__ == "__main__": +# print "Hello World" + +from ProgrammingOutlook import CreatePST +import jpype +import os.path + +asposeapispath = os.path.join(os.path.abspath("./../../../"), "lib/") +dataDir = os.path.join(os.path.abspath("./"), "data/") + +print "You need to put your Aspose.Email for Java APIs .jars in this folder:\n"+asposeapispath + +#print dataDir +jpype.startJVM(jpype.getDefaultJVMPath(), "-Djava.ext.dirs=%s" % asposeapispath) + +hw = CreatePST(dataDir) +hw.main() \ No newline at end of file diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/CreatePST/data/MapiTask.msg b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/CreatePST/data/MapiTask.msg new file mode 100644 index 0000000..7c3db3d Binary files /dev/null and b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/CreatePST/data/MapiTask.msg differ diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/CreatePST/data/Message.msg b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/CreatePST/data/Message.msg new file mode 100644 index 0000000..b194482 Binary files /dev/null and b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/CreatePST/data/Message.msg differ diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/DistributionList/DistributionList.py b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/DistributionList/DistributionList.py new file mode 100644 index 0000000..f55c4cb --- /dev/null +++ b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/DistributionList/DistributionList.py @@ -0,0 +1,21 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +#if __name__ == "__main__": +# print "Hello World" + +from ProgrammingOutlook import DistributionList +import jpype +import os.path + +asposeapispath = os.path.join(os.path.abspath("./../../../"), "lib/") +dataDir = os.path.join(os.path.abspath("./"), "data/") + +print "You need to put your Aspose.Email for Java APIs .jars in this folder:\n"+asposeapispath + +#print dataDir +jpype.startJVM(jpype.getDefaultJVMPath(), "-Djava.ext.dirs=%s" % asposeapispath) + +hw = DistributionList(dataDir) +hw.main() \ No newline at end of file diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/ParseOutlookMessageFile/ParseOutlookMessageFile.py b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/ParseOutlookMessageFile/ParseOutlookMessageFile.py new file mode 100644 index 0000000..2d04739 --- /dev/null +++ b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/ParseOutlookMessageFile/ParseOutlookMessageFile.py @@ -0,0 +1,21 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +#if __name__ == "__main__": +# print "Hello World" + +from ProgrammingOutlook import ParseOutlookMessageFile +import jpype +import os.path + +asposeapispath = os.path.join(os.path.abspath("./../../../"), "lib/") +dataDir = os.path.join(os.path.abspath("./"), "data/") + +print "You need to put your Aspose.Email for Java APIs .jars in this folder:\n"+asposeapispath + +#print dataDir +jpype.startJVM(jpype.getDefaultJVMPath(), "-Djava.ext.dirs=%s" % asposeapispath) + +hw = ParseOutlookMessageFile(dataDir) +hw.main() \ No newline at end of file diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/ParseOutlookMessageFile/data/Message.msg b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/ParseOutlookMessageFile/data/Message.msg new file mode 100644 index 0000000..9d39c17 Binary files /dev/null and b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/ParseOutlookMessageFile/data/Message.msg differ diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/SearchMessagesAndFoldersInPST/SearchMessagesAndFoldersInPST.py b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/SearchMessagesAndFoldersInPST/SearchMessagesAndFoldersInPST.py new file mode 100644 index 0000000..902fa2b --- /dev/null +++ b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/SearchMessagesAndFoldersInPST/SearchMessagesAndFoldersInPST.py @@ -0,0 +1,21 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +#if __name__ == "__main__": +# print "Hello World" + +from ProgrammingOutlook import SearchMessagesAndFoldersInPST +import jpype +import os.path + +asposeapispath = os.path.join(os.path.abspath("./../../../"), "lib/") +dataDir = os.path.join(os.path.abspath("./"), "data/") + +print "You need to put your Aspose.Email for Java APIs .jars in this folder:\n"+asposeapispath + +#print dataDir +jpype.startJVM(jpype.getDefaultJVMPath(), "-Djava.ext.dirs=%s" % asposeapispath) + +hw = SearchMessagesAndFoldersInPST(dataDir) +hw.main() \ No newline at end of file diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/SearchMessagesAndFoldersInPST/data/Message.msg b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/SearchMessagesAndFoldersInPST/data/Message.msg new file mode 100644 index 0000000..9d39c17 Binary files /dev/null and b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/SearchMessagesAndFoldersInPST/data/Message.msg differ diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/SearchMessagesAndFoldersInPST/data/sample1.pst b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/SearchMessagesAndFoldersInPST/data/sample1.pst new file mode 100644 index 0000000..6170f6b Binary files /dev/null and b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/SearchMessagesAndFoldersInPST/data/sample1.pst differ diff --git a/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/StringSearchInPST/StringSearchInPST.py b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/StringSearchInPST/StringSearchInPST.py new file mode 100644 index 0000000..5447b4d --- /dev/null +++ b/Plugins/Aspose.Email Java for Python/tests/ProgrammingOutlook/StringSearchInPST/StringSearchInPST.py @@ -0,0 +1,21 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +#if __name__ == "__main__": +# print "Hello World" + +from ProgrammingOutlook import StringSearchInPST +import jpype +import os.path + +asposeapispath = os.path.join(os.path.abspath("./../../../"), "lib/") +dataDir = os.path.join(os.path.abspath("./"), "data/") + +print "You need to put your Aspose.Email for Java APIs .jars in this folder:\n"+asposeapispath + +#print dataDir +jpype.startJVM(jpype.getDefaultJVMPath(), "-Djava.ext.dirs=%s" % asposeapispath) + +hw = StringSearchInPST(dataDir) +hw.main() \ No newline at end of file