View Single Post
  #1  
Old June 15th 07, 08:47 AM posted to microsoft.public.outlook.program_addins
Ivan
external usenet poster
 
Posts: 39
Default Hot to speed up MailItems access

I get some properties from each MailItem in some folder:

_ItemsPtr spItems = spFolder-Items;
for (int j = 0; j spItems-Count; j++)
{
_MailItemPtr spMailItem = spItems-Item( j+1 );
if ( !spMailItem )
continue;

// SenderEmailAddress, SenderName, SentOn, Subject and Recipients
properties reading here
}

But this code is very slow. Only 130 messages per second even without
reading any properties.

How can I speed up mail items processing greatly? I need to process
thousands of emails...

Thanks.
Ads