Programmatic hook into Get Mail event?

  • Thread starter Thread starter Ben M
  • Start date Start date
B

Ben M

Hi,
I was just wondering whether anyone knew whether there was a programmatic
hook into the event of Outlook getting mail. Is there something that fires
when this happens? I want to be able to fire off some methods of my own when
this happens.

I know there is the Application.NewMail event, but this only fires when
there is actually new mail (doesn't it?).

I looked at the SyncObjects collection also. I thought this might have
something to do with it, but I couldn't be sure.

Thanks for any help,
Ben
 
NewMail fires when new mail comes in but doesn't give you a handle to the
items that arrived and it only fires at intervals. ItemAdd on the Inbox
folder's Items collection will give you a handle to the incoming item and as
long as not more than 15 items come in at once and your event handler code
doesn't take too long will fire for every item that arrives.

SyncObjects will only be relevant if you are manually sending/receiving with
a send/receive group, doesn't apply to earlier versions of Outlook and will
only tell you that the synch is complete.
 
Thanks Ken,
So there's no event which fires just when checking mail, only when there is
new mail?
Cheers,
Ben
 
Back
Top