Re: Parsing Mail Messages

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I'm still having trouble with this. Perhaps it would be helpful to break this into discreet steps:

Step 1: Grab the appropriate message
The intent here is to call this from an Outlook rule. The rule will determine which messages are the right messages, and pass along the message object to the script. If my reading is correct, this is actually fairly easy and straightforward. The MailItem is passed as a parameter to the procedure, I think, so that's already taken care of.


Step 2: Parse the message body for specific information
This part, I think I might actually have a handle on. The idea here is to take the body of the message, search each line for specific keywords, and then put their subsequent values into array. The only part of this I'm not sure how to handle is how to actually get the body text of the message so that I can parse it in this line-by-line fashion.


Step 3: Dump the data
The data stored in the aforementioned array will need to be saved out. If necessary, this can be to a delimited text file, but preferably it would be to a database. For all intents and purposes, the database will be Access. I may actually wind up using MySQL for the backend, I'm not sure yet, but the front end will likely be Access.


Step 4: Save out the attachment
Every message in this group will have an attachment. This attachment needs to be saved to a database as well. If necessary, it could be saved out as a file, but then I'll have to import it to the database anyway.


Step 5: Delete the message
When all this is done, the message is no longer necessary.

That's it. I think I understand how to do the bulk of the work, but the devil's in the details. I don't really understand how to get the information that I need yet. Any help would be appreciated.

grep


grep wrote:
I get emails from one of my vendors, to help me keep track of my clients' accounts with them. These messages contain about 6-7 pieces of information that I would like to capture, before I get rid of the email. Specifically, I would like to write a script, called from a rule, that would parse a message for specific text, grab the data that follows that text, and pop it into an Access database, or at least a CSV file.

Further, if possible, I'd like it to grab the attachment (there's always a zip-file attachment), and place that in the database as well. These are very small zip files, and I don't think they'll pose a problem.

How can I do this? Can anyone point me in the right direction? (I'm new to this stuff.)

grep
.



Relevant Pages

  • Re: Reboot instead of debugger/dump from X11? (Re: an accidental way to pull the plug)
    ... when it took place with X11 ... on startup and switch back to the text console. ... I have been using FreeBSD as a fine platform for a Free database I ... using xv to grab the windows. ...
    (freebsd-current)
  • an accidental way to pull the plug
    ... so I am letting you folks know. ... I have been using FreeBSD as a fine platform for a Free database I ... using xv to grab the windows. ... wait (it has a timer delay, which I set to 5 seconds). ...
    (freebsd-current)
  • Re: "stamping" records by user
    ... Just enter =curentuserin the timestamp field's default value, ... Do a search if you would prefer to grab the login name from Windows and use ... create a new case record (this database is medical-related). ... by making a drop-down list of usernames and making it mandatory ...
    (microsoft.public.access.formscoding)
  • Re: $_server[php_self]
    ... delete a database but i really want it to grab the stateselect extention and grab all the cities related to that state. ... First off I wanted to suggest you do some reading on PHP Security as your application falls victim to an input validation failure. ... Work on formatting and not hiding errors. ... Also you only need to select the database once, and you should reuse variables when they make sense to. ...
    (comp.lang.php)
  • Re: Problem with function pointers and structures
    ... To me it looks a bit as if you're still in a design stage of your ... It looks as if you intent to use some OO techniques implemented ... a database if I interpret the 'PGconn' variable correctly - it ... can deduce from what you've posted. ...
    (comp.lang.c)