[opensource] automated email parsing

Anish Mistry mistry.7 at osu.edu
Mon Apr 14 22:08:12 EDT 2008


On Monday 14 April 2008, Peter Dietz wrote:
> Paul Betts a while back made a door access email program that accepted
> input from an email, and then was able to parse it, extract data, and then
> make a decision on it.
>
> I would like to some similar thing, (not related to the door, nor will it
> be likely to cause a stir), but it would need to take in emails, grab the
> data, and in my case, put it in a mysql database. My question is, where do
> I begin?
>
> I'm comfortable doing processing of strings, so that I can do, but how do I
> get a program I make get activated by emails, and so and so forth.
>
> for an example, here is some sample data... (for football)
> Statistics                  phant0mX22        BUDDHA1010
> Rushing attempts for                  5              27
> Rushing yards for                    23             286
> Passing attempts for                 30              16
> Passing yards for                   417             159
> Punts                                 1               0
>
>
> Thank you. (why do I think I'm going to get a reply that I should go learn
> perl...)
I created a similar type thing for a work project a couple of months ago.  I 
just used PHP + PEAR::Net_IMAP fired off from a cron job.  Using regular 
expressions it only took about 30 lines of code including some basic header 
checks, etc.  Marked the messages as read and moved them to another folder to 
indicated that my script had already seen them.

-- 
Anish Mistry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part.
Url : http://mail.cse.ohio-state.edu/pipermail/opensource/attachments/20080414/aa2969ab/attachment.bin


More information about the Opensource mailing list