コード例 #1
0
 ///<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();
     }));
 }
コード例 #2
0
        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);
                }
            }));
        }