We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Exception "Incorrect option value day of week a recurrent rule" on extracting message from PST file(Java)

Using Aspose Email for Java trying to extract the messages from the pst file attached [1] and getting this error:

AsposeException: Incorrect option value day of week a recurrent rule.

private static final SaveOptions SAVE_OPTIONS_EML = SaveOptions.getDefaultEml();
private static final int SAVE_OPTIONS_VCARD = ContactSaveFormat.VCard;

private static void main(String[] args){
	PersonalStorage pst = PersonalStorage.fromFile(<Put pst file here>, false);
	FolderInfo rootFolder = pst.getRootFolder();
	extractFolder(pst, rootFolder, getDestinationPath(), info);

private void extractFolder(PersonalStorage pst, FolderInfo folder, Path parentDirectory)
		throws ExtractionException {
	String folderName = folder.getDisplayName();
	Path folderPath = Paths.get(parentDirectory.toString(), folderName);

	int messageNumber = 0;
	Iterator<String> iterable = folder.enumerateMessagesEntryId().iterator();
		String messageEntryId = iterable.next();
		String fileName = getDirectoryString(folderPath, messageNumber);
		MapiMessage message = pst.extractMessage(messageEntryId);
		IMapiMessageItem item = message.toMapiMessageItem();

		if (item instanceof MapiContact) {
			((MapiContact) item).save(fileName + ".vcf", SAVE_OPTIONS_VCARD);
		} else {
			message.save(fileName + ".eml", SAVE_OPTIONS_EML);

	for (FolderInfo subFolder : folder.getSubFolders()) {
		extractFolder(pst, subFolder, folderPath);

[1] https://www.dropbox.com/s/rnstzv70gn6ahx8/SMJ.PC.00000004.pst.zip?dl=0


I have investigated this issue on my end have been able to observe the issue. An issue with ID EMAILJAVA-34541 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

Its showing that EMAILJAVA-34541 is in a closed state now, but I did not receive any release notification. Can you please let me know which version the fix was included in?


We have investigated the issue on our end. The message contains incorrect FirstDOW value in property PidLidAppointmentRecur.


The following table specifies how to map WKST values to FirstDOW values.

WKST FirstDOW SU 0x00000000 MO 0x00000001 TU 0x00000002 WE 0x00000003 TH 0x00000004 FR 0x00000005 SA 0x00000006

The incorrect message also is not opening in Outlook (if we open PST and scroll to the message)

In this case, you just needs to handle the exception.