On Tue, Nov 20, 2001 at 10:14:55PM -0500, [EMAIL PROTECTED] thoughtfully 
expounded:
> 
> On Tue, 20 Nov 2001, Ashley M. Kirchner wrote:
> >     I'm trying to find a solution where I can take an incoming email and
> > have something, an external program, parse the data as it arrives and
> > pipe the necessary information through to a database, say MySQL...
> > Basically we receive orders over the net and every order placed
> > generates an email.  That email I would like to parse, extract the
> > necessary information and shove it into a database, automatically, with
> > no user interaction.  (such script I will write of course)
> >
> >     Anyone have any suggestions?
> 

[snip]

> 
> # invoked from /etc/aliases like this
> # checkpoint_pager:    [EMAIL PROTECTED],
> "|/home/cgalpin/bin/checkpointMonitor.pl"
> #
> # or from procmail like this
> # | /home/cgalpin/bin/checkpointMonitor.pl
> #
>

Ashley,

I did much the same thing, and then set up a PHP-driven HTML page to look over
the results loaded into the database.  The key is to set up a procmail recipe
that captures this mail and pipes it to the perl script.  SInce the outgoing
mail is to many different people, I guess you would need to BCC: a constant
address you would pick up in the procmail recipe. 

One ignorant question:  Can't you modify the process that generates the email
to update the database directly?

-- 
Tom Porter                                       [EMAIL PROTECTED]
------------------------------------------------------------------------
"On two occasions I have been asked [by members of Parliament], 
'Pray, Mr. Babbage, if you put into the machine wrong figures, will 
the right answers come out?'  I am not able rightly to apprehend the 
kind of confusion of ideas that could provoke such a question."



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to