Hi,
I used the Aspose dll to create pst file.It works fine for small files.
But there are some eml samples for that it took high memory.Even after it doesn’t release memory.
That is ok it took memory while loading the eml file but afterwords it should release it.
Even I observe that when I load multiple eml file one after other the memory got piled up.
Please consider this issue on priority basis.I am using Aspose.Email.dll (4.0.0.0).
I have attached one sample msg file for which also it took large memory and doesn’t release it.
Kindly waiting for your reply.
Thanks and Regards,
Shital
Hi Shital,
MapiMessage mapi = MapiMessage.FromFile(@“D:\Aspose\sample\Sample.msg”);
PersonalStorage pst = PersonalStorage.Create(@“D:\Aspose\sample\pstFile.pst”, FileFormatVersion.Unicode);
pst.RootFolder.AddSubFolder(“TestFolder”);
FolderInfo outfolder = pst.RootFolder.GetSubFolder(“TestFolder”);
for (int i = 0; i < 10; i++ )
outfolder.AddMessage(mapi);
Hi,
I am using Aspose.Email.dll(4.2.0). Since I am dealing with the lakhs of mails to add to pst file.
The whole procedure of adding message to pst ends with the memory licks.
When I am adding messages one after another the memory get piled up and eventually application got crash.
Will you check with the large number of messages.
Thanks and Regards,
Shital
Hi Shital,
static void TestPSTInMemory3()
{
string dir = @“D:\Aspose\PSTInMemory”;
File.Delete(dir + @“AnotherSample.pst”);
FileStream fileToSave = new FileStream(dir + @“AnotherSample.pst”, FileMode.Create, FileAccess.Write);
MemoryStream memStr = new MemoryStream();
using (PersonalStorage pst = PersonalStorage.Create(memStr, FileFormatVersion.Unicode))
{
FolderInfo fInfo = pst.CreatePredefinedFolder(“Inbox”, StandardIpmFolder.Inbox);
MapiMessage mapi = new MapiMessage("from@domain.com", "to@domain.com", “Subject”, “Body”, OutlookMessageFormat.Unicode);
for (int i = 0; i < 3000; i++)
{
mapi.Subject = mapi.Subject + i;
fInfo.AddMessage(mapi);
memStr.WriteTo(fileToSave);
Console.WriteLine(i + " Messages written to file");
}
}
fileToSave.Close();
memStr.Close();
}
Hi,
I will test with the suggested changes.
But with testing I am also came across one more issue.
It throws exception as follows for more than 30 thousand mails when I am testing for large number of mails.
Exception is as follows
--------------------------------------------------------------------------------------------------
at ..( )
at .?.?( , ? , )
at .?.?(UInt16 , UInt32 , )
at .?.?( )
at .?…ctor( , )
at ..(UInt32 )
at .??.??()
at .??.??()
at .??.Load()
at .??.??(MapiPropertyCollection , Boolean )
at ..?(MapiMessage , FolderInfo , ?? , Boolean )
at ..AddMessage(FolderInfo , MapiMessage , ? , ?? , Boolean )
at ..AddMessage(FolderInfo , MapiMessage )
at Aspose.Email.Outlook.Pst.FolderInfo.AddMessage(MapiMessage message)
----------------------------------------------------------------------------------------------------
And it is come in v 4.2 .It is difficult to trace out sample.But if possible I will provide you sample.But it is great if you find the issue by observing exception.
Thanks And Regards
Shital
Hi Shital,