This is about Fedex tracking - they are sending automated emails whenever a shipment is sent (i.e. scanned on departure) or delivered. I want to write an application which will just read these emails, extract data from messages (which are, luckily, plain text) and store them in a DBF.
I've tried several approaches:
- Outlook - no way, too much security hassle, this needs to work unattended
- CDO - this again hooks into Outlook somehow, or presents a dialog
- MAPI - turns out to be another way to invoke some Outlook object, dialog again
- webmail via an IE object, parsing the HTML - this is the most promising so far, but it detects inactivity (!) and requires a login after each few pages. The login can be automated, though, and maybe in the end that's what I may end up doing, if more elegant approaches fail.
- ADSI - the documentation is so labyrinthine, whatever I look for gives me a new way to look for printers, users and their rights.
So, is there a way to do some sort of SQL-like select from Exchange server's messages, for a given user and time interval? If so, what would be the format of the recordset? ADO RS, I presume, or XML?