I have an Outlook client that is always running, on a machine always logged in. It uses a special email address and it's not a person. We use this email as a "traffic cop" that captures inbound mail from disparate business systems inside the building and then through VBA executes certain procedures, for example it will read the incoming mail and based on the subject go off in one case write an XML file to disk on a remote server that will be absorbed into another business system. We use the client as "glue" for integrating these systems. So far so good.
I have one routine that reads all inbound emails and then based on subject line (or lack of) content branches the action to take. I have in this routine a For Each (For Each InboxItem In olFolder.Items) statement that picks through the subject line. My question is will this routine look at multiple simultaneously received emails one after the other? I cannot easily test this scenario and want to make the tool robust. Does the For Each InboxItem step through one new email and then the next or will it just do the first one? Is there a better way to do what I am attempting here? I trigger this routine via a call from ThisOutlookSession using Sub Application_NewMail. Any insights here would be most appreciated.
I have one routine that reads all inbound emails and then based on subject line (or lack of) content branches the action to take. I have in this routine a For Each (For Each InboxItem In olFolder.Items) statement that picks through the subject line. My question is will this routine look at multiple simultaneously received emails one after the other? I cannot easily test this scenario and want to make the tool robust. Does the For Each InboxItem step through one new email and then the next or will it just do the first one? Is there a better way to do what I am attempting here? I trigger this routine via a call from ThisOutlookSession using Sub Application_NewMail. Any insights here would be most appreciated.