Andre Rossouw
Guest
|
Hi all,
I need to save all incoming mail to a DB. I have written it with Delphi 7 and using Add-in Express 2010.
Is there a event that fires so that I can be certain the mail would be save to the DB?
Currently I am using the NewMailEx event. It works fine on Outlook 2007, but in Outlook 2003 I have a problem that when I call GetItemFr omID, that mail is not available yet.
For example:
Procedure OutlookEventsNewMailEx(ASender: TObject;
const EntryIDCollection: WideString);
var
mi: MailItem;
begin
mi := MailItem(outlookApp.Session.GetItemFromId(EntryIdCollection, ''));
AddMailInboxLocal(mi); //Just adding the data to the DB, but I get an AV
end;
Also, is there another way of doing this? I have read the following about the lim itations of trying this. http://www.add-in-express.com/creating-addins-blog/2008/04/25/newmail-itemadd-outlook-events/.
Regards,
Andre |
|
Andrei Smolin
Add-in Express team
Posts: 18825
Joined: 2006-05-11
|
|
Andre Rossouw
Guest
|
Thanx for the info and prompt response Andrei. Will have a look at it.
Regards
Andre |
|