Receiving mail with Outlook 2000 VBA
I have been using "Outlook 2000 VBA" for the last couple of years and developed various applications to enhance my version of Outlook 2000. The current project I am working on is an anti-spam system.
My goal is to check emails (Deleting the spam) whilst they are still on the server before normal retrieval by Outlook 2000. I have easily achieved most of this using various POP3 libraries but now want Outlook to download the remaining mails only when the server has been "cleaned".
How do I programmatically, through the Outlook object model, cause Outlook to check for new messages. Manually, one would do this by:
a) Pressing F5;
b) Pressing the Send/Receive button, OR;
c) Tools - Send/Receive - All Accounts
Obviously I would like my application to be running in the background (Or regularly scheduled), downloading the non-spam email at regular intervals - similar to the "Mail Delivery" option of check for new messages every X, however not being driven by Outlook but instead my external application.
I have found the CreateItem method but nothing comparable for retrieving mail.
Thanks for any help that can be offered,
Regards
Simon
|