///<Summary> /// ConvertMboxToPst method to convert mbox to pst file ///</Summary> public Response ConvertMboxToPst(string fileName, string folderName) { return(ProcessTask(fileName, folderName, ".pst", false, false, delegate(string inFilePath, string outPath, string zipOutFolder) { MailStorageConverter.MboxToPst(inFilePath, outPath).Dispose(); })); }
Response ConvertMboxToOst(string fileName, string folderName) { return(ProcessTask(fileName, folderName, delegate(string inputFilePath, string outputFolderPath) { var shortFileName = Path.GetFileNameWithoutExtension(inputFilePath); var tempPath = Path.Combine(outputFolderPath, shortFileName + ".pst"); try { using (var pst = MailStorageConverter.MboxToPst(inputFilePath, tempPath)) pst.SaveAs(Path.Combine(outputFolderPath, shortFileName + ".ost"), FileFormat.Ost); } finally { System.IO.File.Delete(tempPath); } })); }